Confused over wp-config.php and 'database user + database password + name'

by henry   Last Updated November 08, 2017 05:08 AM

I have a domain with a subdomain.

Each of those has a different install of WordPress.

When I created the databases I made the following:

Main Domain = database called: maindomain Sub Domain = database called: subdomain

I applied the SAME database username to both databases....

So all nice and simple....

However, why is the Database Password the same?

/** MySQL database password */
define('DB_PASSWORD', 'passwordhere');

When I reset the password for the database username (which I had forgotten) it made my main domain crash?

So I guess my question is - have I just merged two databases together? Is that even possible?

Hope thats clear!



Answers 1


The password belongs to the user, not the database. You have multiple databases, but just one user.

You can also have multiple installs share the same database, you just need a unique $table_prefix for each install.

Milo
Milo
November 08, 2017 04:17 AM

Related Questions




ERROR: "Table Prefix" must not be empty

Updated April 15, 2018 17:08 PM


Switching Databases in LocalHost

Updated October 01, 2017 11:08 AM