Often, it’s invisible characters that mess things up.
Use this script to get a finer-grained error message:
https://gist.github.com/sivel/162913
As there are only 4 parameters, you can also manually retype them in wp-config.php
Moderator
t-p
(@t-p)
Thanks both. @sterndata, I’ve run that and it connects fine all tables are ok…
Will work my way through the codex again…:(
A ltitle update on this. If I intentionally use incorrect mySQL user details in my wp-config.php, I get the following (nicely formatted!) message:
Warning: mysql_connect(): Access denied for user ‘root’@’localhost’ (using password: YES) in /var/www/pssru/public_html/wordpress/wp-includes/wp-db.php on line 1482
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
However, with the correct details, I get the very plain (Times New Roman):
Error establishing a database connection