I may be a newbie to wordpress, but not to *nix and php/mysql and i’ve tried everything i know to do. I’ve followed the instructions (not that hard), yet after 6 or more hours of trying, i still get the dreaded “Error establishing a database connection! ” message when trying to go to http://mydomain.com/wordpress/wp-admin/install.php . I’ve edited the wp-config.php file in vi 20 or more times, ive also replaced it a few times and checked it probably 30 times or more. Ive given the whole wp directory 777 permissions recursively. I CAN connect to the mysql database using a windows client with the credentials which i have memorized permanantly. and i CAN connect to the my sql database using myphpadmin (web-based) and those credentials from any box in my sight. I ‘assume’ that the mysql/apache mod is working fine. I’ve searched this forum and noone seems to have this much trouble just getting started. Can someone please suggest what the next diagnostic step could be?Anonymous
Mac OS X does not come with MySQL pre-installed, you will have to download and run the installer.
Then you will need to run through it’s set up instructions so your root account is activated with a password. From there you can create other users and what not.
It sounds to me like you don’t have MySQL installed.
I have it WP running locally on my iBook since version 0.72 without any trouble. I am sure the problem is not WP related.
Can you get to the mysql command line on the Terminal?
Here is the config file. Yes, i CAN run SQL statements on the database, create users, change privledges, etc. using MyPhpAdmin (it uses apache directory/php scripted) and MySqlFront. At this point the mySQL root account has no password. I’m trying to leave things open and get it working now. Is it necessary to have a mySQL root password to get WP to connect to the database?
/** WordPress’s config file **/
/** http://wordpress.org/ **/
// ** MySQL settings ** //
define(‘DB_NAME’, ‘blog2’); // The name of the database
define(‘DB_USER’, ‘b2’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mypassword’); // …and password
define(‘DB_HOST’, ‘adsl-209-204-139-32.sonic.net’); // 99% chance you won’t
need to change this value
// Change the prefix if you want to have multiple blogs in a single database.
$table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);
/* Stop editing */
I’m assuming that you can access the WordPress directory from the browser. In phpadmin, make sure you have a new table created. In config.php, use root as username, and for the pass put a space inbetween the single quotes ‘ ‘. Host is localhost.Anonymous
Thanks again Anatman! Your steps got me to a point where i could see the problem!!
– i added mysql to my PATH
– i installed and ran cocoaMySql and noted when i added my credentials i *couldn’t* log in, unlike the success i had with phpMyAdmin
I finally narrowed down the problem to the user@hostname error. my user was b2 and a hostname “any” as named in phpMyAdmin. i deleted this user and specified localhost as the hostname and things got better immediately after that, heh.
it’s that ANY word again. Somehow it was slightly less aggravating looking for the “any key” on my computer 😉 when i was diagnosing a seperate issue in the past. 😛
Thanks for the help.
- The topic ‘Database Connection Trouble – WP on Mac Panther Tr’ is closed to new replies.