Cannot connect blog to MySQL. MySQL Error Nr. 1045
I am trying to setup wordpress on a machine running CentOS 4.1 (Essentially Red Hat Enterprise Linux 4). I believe that I have installed all the necessary packages such as php, mysql, mysql-server, apache2 etc etc.
When I tried to go through the phpMyAdmin tool to add the blog database I got the error:
Could not connect to host ‘localhost’.
MySQL Error Nr. 1045
Access denied for user ‘root’@’localhost’ (using password: YES)
I then typed mysql -u root and got the following:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.10a
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
The error msg changed slightly to:
Welcome to phpMyAdmin 2.6.2-pl1
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
MySQL said: Documentation
#1045 – Access denied for user ‘root’@’localhost’ (using password: NO)
When I connect to WordPress I get the error msg:
Canâ€™t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the blog database.
* Are you sure it exists?
* On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?
Unfortunately I am not an expert on mysql or even a novice for that matter. Does anyone know how to fix this?
Thank you for any help you can give me.
- The topic ‘Cannot connect blog to MySQL. MySQL Error Nr. 1045’ is closed to new replies.