WordPress.org

Ready to get started?Download WordPress

Forums

Cannot connect blog to MySQL. MySQL Error Nr. 1045 (3 posts)

  1. alterego125
    Member
    Posted 8 years ago #

    Hi,

    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.

    mysql>

    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.
    Error

    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.

    Kind Regards,

    Alterego125

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    "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."

    You have not associated the database with the user.

  3. alterego125
    Member
    Posted 8 years ago #

    How can I associate the database with the user?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags