UPDATE: 2020-07-12 I tried installing on Windows 10 64-bit and it failed to install WordPress with the same database error as on Windows 7. That tells me that either there is a bug in WAMPServer 3.2.0 or there is a bug in WordPress 5.4.2. because the issue occurs on both operating systems.
ISSUE
I’m installing WordPress on WAMP as a local development server, WordPress fails to install, so no config file is created.
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 wp_ehw_20200627 database.
Are you sure it exists?
Does the user root have permission to use the wp_ehw_20200627 database?
On some systems the name of your database is prefixed with your username, so it would be like username_wp_ehw_20200627. Could that be the problem?If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.
MY SYSTEM DETAILS
- Windows 7 Ultimate 64-bit
- WAMPServer 3.2.0
- WordPress 5.4.2
HERE IS WHAT I KNOW
- The database exists and I can run SQL commands on it in phpMyAdmin.
- My user is root
- Host is localhost
- Database is wp_ehw_20200627
- root has all privileges to database (as verified in phpMyAdmin)
NOTE: I asked a similar question about a year ago, but this one is significantly different in that with the previous question WordPress was already installed, wheres in this scenario it is not.
THINGS I TRIED ALREADY
Suspecting that there might be issues with the naming of the database, I tried creating various empty databases for the install with different names. Success here is measured by whether or not the config.php file was created. Here are some of the names and results I tried:
- wp_ehw_2020627 – failed
- wpehw20200704 – failed
- test – SUCCESS!
By using the db I created named "test", for the first time I got this SUCCESS message:
"All right, sparky! You’ve made it through this part of the
installation. WordPress can now communicate with your database. If you
are ready, time now to…Run the installation"
This result was encouraging, but that wasn’t the database name I wanted. Suspect the issue was the length of the database name (in characters), I continued testing with differnt names, getting smaller in size each time.
- ehw200704 – failed
- 200704 – failed
Finally, since "test" was the only name that worked so far, I picked another easy four-letter word to test if four was the magic number.
- john – failed
WEIRD ….
I also cleared Chrome cache in between each install attempt. I deleted the config file after success.
RESULTS
Only "test" created the config file.
I am very confused by these results.
Any help is appreciated.