Reputation: 51
I am having trouble connecting my database to WordPress using Wampserver at the wp-admin setup.
I am following the steps in this tutorial: https://www.wpbeginner.com/wp-tutorials/how-to-install-wordpress-on-your-windows-computer-using-wamp/
I've created a database in Wampserver with the name "test_db".
At WordPress setup I’m entering the following information:
Database Name: test_db
Username: root
Password:
Database Host: localhost
Table Prefix: wp_
I click submit, and I get this error page:
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 test_db database. Are you sure it exists? • Does the user root have permission to use the test_db database? • On some systems the name of your database is prefixed with your username, so it would be like username_test_db. 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.
I've tried using another database without an underscore, naming it "testdb". I still get "Can't select database" error.
I've also tried changing the privileges of the database. I went into Wampserver phpMyAdmin app. Under server 127.0.0.1 I went to the user accounts tab and selected Edit Privileges for the root localhost user. I clicked the database button. I picked the test_db item and clicked Go. I check marked the Check All box, then clicked Go. When I ran WordPress install I still got "Can't select database".
Help appreciated, thank you.
Upvotes: 1
Views: 3696
Reputation: 51
SOLVED! During setup, wp-admin_setup-config.php_step=1, in the form for database connection details, I entered “localhost:3308” instead of “localhost” for Database Host.
Upvotes: 4