# How to make WordPress use old database?

**URL:** https://forum.infinityfree.com/t/how-to-make-wordpress-use-old-database/81552
**Category:** Hosting Support
**Created:** [August 23, 2023, 1:02am UTC](https://forum.infinityfree.com/t/how-to-make-wordpress-use-old-database/81552 "2023-08-23T01:02:11Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)
#### Post date: [August 23, 2023, 9:36am UTC](https://forum.infinityfree.com/t/how-to-make-wordpress-use-old-database/81552/8 "2023-08-23T09:36:28Z")

</div>

The message “Error establishing a database connection” could mean anything. It means there is _an_ error, but no information as to what the error is.

To see the actual error, you can enable WP\_DEBUG mode: [Debugging in WordPress – Advanced Administration Handbook | Developer.WordPress.org](https://wordpress.org/documentation/article/debugging-in-wordpress/#wp_debug)

You should then be able to see the actual error message, and compare those against the common errors in this article:

> [@Common MySQL Connection Errors](https://forum.infinityfree.com/t/common-mysql-connection-errors/49338):
>
> Many websites use MySQL databases to store information and settings. However, there are some reasons why the connection to the database may fail. This article describes some commonly seen error messages when connecting to a database, as well as some general tips to keep in mind when setting up a database connection. Common Error Messages Using MySQL is great, but the error message returned if there is an issue logging in to your database can be quite confusing. Here are some commonly seen error…

> [@MattPerry](#):
>
> What I see as MYSQL PASSWORD in dashboard is different than DB\_PASSWORD wp-config.php…

Normally, your account username and password are also your MySQL username and password, meaning you have one user/password for all databases.

Softaculous muddies this a bit by creating its own users and passwords. If you’re migrating websites, you probably can’t use those credentials as they only have access to the specific database they were created for, not all databases in the account (I think).

So you’ll want to remove all the existing database credentials and enter the username, password, hostname and database name shown in the client area. Please don’t go mix and match credentials, it’s going to end badly.

---

_[View the full topic](https://forum.infinityfree.com/t/how-to-make-wordpress-use-old-database/81552)._
