• So I installed WAMP and dropped WordPress into www. I created a database named worspress in myPHPadmin then went to localhost/WordPress. I then used the database name, root as the username, and no password because I have not set one and it gives me the “We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.” error.

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • First thing to check is the database’s name. In the above post you state that the database is named worspress… is that what’s in wp-config.php?

    Thread Starter thepilotvoltage

    (@thepilotvoltage)

    There is no wp-config.php as the website hasn’t been set up yet. This is at the first setup screen.

    Mel

    (@melaniecpn)

    I had the same problem as you and eventually managed to solve it by doing the following:

    1. My database name was too long (over 16 characters long) and so I shortened it.
    2. On my localhost/phpmyadmin dashboard, at the top of the page, I saw the port number read: Server:MySQL:3308
    So I opened the wp-config-sample.php file in C:\wamp64\www\yoursitefoldername and amended the ( ‘DB_HOST’, ‘localhost’ ) text to ( ‘DB_HOST’, ‘localhost:3308’ )
    Then in WordPress I tried entering the database connection details again and for the Database Host field, entered localhost:3308 instead of just localhost.
    It worked: All right, sparky !

    Hope this helps more people.

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