I have read many of the posts for this problem and am still left unable to connect. ALL I am doing is moving an existing WordPress site from an Ubuntu 6.06 LAMP server to an Ubuntu 8.10 LAMP server.
I can connect to the MySQL DB using the same connection info from wp-config.php in a test php file:
<?php $db = @mysql_connect('localhost', 'dbname', 'dbpassword'); if (!$db) echo "connection failed"; else echo "connection succeeded"; ?>
results with “connection succeed”
I have attempted replacing ‘localhost’ in wp-config.php with the server’s dedicated IP as well as 127.0.0.1
I can log directly into MySQL via console using the credentials in the connection string.
But the only thing that will solve the problem I can find so far is if I don’t change servers! *sigh*.
The original WordPress site was running PHP5 and MySQL 5.0.22
The new server is running PHP5 and MySQL 5.0.67
Any other ideas as to what I am missing here??
- The topic ‘“Error establishing a database connection” – it’s not a bad username or password’ is closed to new replies.