Tried to connect my database to WordPress using WAMP at wp-admin setup using the following steps: Database Name test_db, Username root, Password, Database Host localhost, Table Prefix wp_. “Can’t select database” error shows up. What am I doing wrong here?
That can happen when the DB user privileges were not set for the new DB. You should double check them. Enter the phpMyAdmin app by clicking the MySQL Admin button for WAMPP control panel. Under server 127.0.0.1 go to the user accounts tab and select Edit Privileges for the root@localhost user. Click the database button. Pick the test_db item and click Go. Checkmark the Check All box, then click Go.
Check the solution in this link
Hope it helps