• Help! I downloaded Wamp Server on my portable local drive. Follwing directions in wpbegginer.com/wp-tutorials/how-to-install-wordpress=on-your-windows-computer_using-wamp64. I used Google Chrome as the browser. I followed the setting up a database for local wordpress setup instructions on the local host phpMyAdmin. When got to phpMyAdmin, the directions say to enter root as user name and leave password blank, and chose MySQl as server choice and clicked go. I logged in to the MySQL local server to create a database. Named it notary_db and chose Collation and created the blank database. I installed wordpress to a folder named WordPress and renamed it mylocalwordpresstestsite.I then opened the web browser and went to https://localhost/mylocalwordpresstestsite/ , chose English and clicked Lets’ Go! I entered database details: database name notary_db, chose root as user name, blanked out password, chose local host as database host, and wp_ as table prefix and clicked submit. At this point I got the message:
    Can’t select databaseWe were able to connect to the database server (which means your username and password is okay) but not able to select the notary_db database.
    Are you sure it exists?
    Does the user root have permission to use the notary_db database?
    On some systems the name of your database is prefixed with your username, so it would be like username_notary_db. Could that be the problem?
    How can I fix this issue since I followed the direction exactly? I have windows 10 desktop pc 64 bit.

    • This topic was modified 4 years, 7 months ago by James Huff. Reason: moved to Localhost Installs forum, since this is a localhost issue

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Welcome to the localhost world.
    My suspicion is that your root user does not have permissions on the database you created, these steps will help you check and fix this.
    – in your browser load phpmyadmin, login etc.
    – you will get a display that list your databases in a column on the left, one of them should be “information_schema”, and your “notary_db”, please confirm this.
    – click on “notary_db” and the tab: “Privileges”, it will list the databse users and their settings, in the “Privileges” column it should say “All Privileges” against “root”, use the “Edit Privileges” link to fix if necessary. please report what you see.

    If the above does not help then check your server error logs, also suggest you then seek support from the”Wamp” community.

    Thread Starter sandiegonotaryguy

    (@sandiegonotaryguy)

    Thank you Ross. I will check that out in the next couple of days and let you know of the progress.
    Steve

    I’m having the same issue with MAMP on a Mac. I’ve checked PHYMyAdmin and the root user and the other user that I set up both have the correct “All Privileges”. I created a test.php script to test my DB credentials and the connection is successful. My issue is that the “no database selected” error displays after upgrading my PHP. If I select any version greater than PHP 7.1.32, I get the error. As soon as I switch it back, the website works. So, I don’t believe that this is a DB issue in my case.

    Hello @jbdegarmo
    Welcome to the WordPress support forums. Please take the time to read the forum guidelines, it is very strongly required that people NOT drop into running threads with their own issues. Trust us it works better for everyone if you were to start a new thread to ask your question, by all means read threads to see if they fix your problem, but if you need your own help, then start a new thread. It may not make much sense to you, but that is because you are new here. Among the reasons this is a rule is that many people like myself scan for and read threads that are new, adding your question into a thread means that many fewer people will see it.

    That aside, it does seem that you do not have a database problem, but rather a PHP version related one. Suggest that you enable maximum debugging options and look into the WordPress and server logs.
    In your file: ‘wp-config.php’
    find the line with: define( 'WP_DEBUG', and comment it out and add:

        error_reporting(E_ALL); ini_set('display_errors', 1);
        define( 'WP_DEBUG', true);

    Then see if you get any messages or logged errors.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress Error Can’t Select Database’ is closed to new replies.