WordPress cannot select new MySQL database

Website URL

https://blog.paolasolarinsights.com

Error Message

WordPress displays the error “Cannot select database” when I visit https://blog.paolasolarinsights.com/wp-admin/.

The database server is reachable, but WordPress cannot select the database if0_43254055_blognuevo.

The database exists in my InfinityFree account, and I can open it in phpMyAdmin and see the WordPress tables. The MySQL username configured in wp-config.php is if0_43254055, and the database host is sql305.infinityfree.com.

Could you please help me determine why WordPress cannot select this database and how to configure the connection correctly?

Other Information

My temporary WordPress website, https://paolablog.fwh.is, is still working correctly, and I want to keep it intact.

I created a new database named if0_43254055_blognuevo and imported my WordPress database into it. I updated the DB_NAME setting in the new domain’s wp-config.php file and changed the siteurl and home values in the new database to https://blog.paolasolarinsights.com.

However, the new website displays “Cannot select database”. I can access the new database through phpMyAdmin and see its WordPress tables.

Please help me resolve this database connection issue without affecting my working temporary website or its original database.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

The database name in your post, if0_43254055_blognuevo, matches the one on your account exactly. So if WordPress still can’t select it, the name in the error and the name in wp-config.php may not be the same.

Could you paste the full error text from the page, starting at “Cannot select database”? It names the database WordPress tried to select and the MySQL user it connected as. Comparing those two with the database in phpMyAdmin should show where they differ. Please also paste the DB_NAME and DB_USER lines from the wp-config.php of the new site, leaving out the password.

I couldn’t find an answer for this in the knowledge base or in earlier topics. The similar “Cannot select database” topics I found have no answer, so I’m not linking them.

Your site seems to be working fine from here:

Your wp-admin also seems to be functioning normally.

I don’t know why you would have seen that error before, I don’t see anything unusual about your site.