• Resolved ankiov_setpsnaz

    (@ankiov_setpsnaz)


    So below is the error message I get.

    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 huangg.com database.

    *Are you sure it exists?
    *Does the user testing have permission to use the DB_NAME database?
    *On some systems the name of your database is prefixed with your username, so it would be like username_DB_NAME. Could that be the problem?

    And I have seen other postings and tried them and none of them worked.

    here is what I have tried

    * Made sure database exist. (I have installed mysql client and I can created, select, insert and other operations)
    * Made sure user have right privileges.
    * Flushed privileges on MySQL

    Can some one help me with my problem?

    I’m using MySQL in Amazon’s EC2 and Glassfish.

Viewing 3 replies - 1 through 3 (of 3 total)
  • – First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, if the hosting package is set to Windows and not Linux, etc .

    – double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.

    -Then check that you don’t need to change the database host from “localhost” to something else. You can get that info from your hosting provider.

    -Check you have actually created a database with the same database name as is in your wp-config.php file.
    -Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider.

    Thread Starter ankiov_setpsnaz

    (@ankiov_setpsnaz)

    I’m connecting to database correctly from the independent sql client and I’m able to created, insert, drop tables without any problems for the database I’m trying to use with user id and password I’m attempting to configure wordpress.

    My EC2’s security group setting allows 3306 port and my netstat and iptables command confirm that I have the correct port and it is open.

    Basically, only wordpress cannot connect to my database.

    It has been two days since I’ve been stuck on this issue and this is driving me mad….

    Thread Starter ankiov_setpsnaz

    (@ankiov_setpsnaz)

    This is now resolved.

    Issue was in this line.

    Does the user testing have permission to use the DB_NAME database?

    “DB_NAME” isn’t my database, and I noticed that DB_NAME isn’t set correct with custom database name when I tried to configure without manually configuring “wp-config.php”.

    So I went back to manually configuring “wp-config.php”. But when I access “index.php” it redirect me to “wordpress/index.php/wp-admin/install.php”.

    Which is obviously wrong. it needs to be “wordpress/wp-admin/install.php”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Another "Can't select the database"’ is closed to new replies.