Can have same name for db on different hosts?


#1

i just created an empty mediawiki database on one mysql hostname, lets call it mysql.hostname1.com.

and wanted to do the same for another site (and put that on mysql.hostname2.com)

Seems like you should be able to have a database named ‘wikidb’ for the different hostnames.

I intitally thought u get unlimited databases on 1 mysql account sorta. But since it asked for hostname, i was like ‘cool, they musta set it up this way so u can can mysql databases on the different domains you are hosting and therefore have a database named blah without worrying there is another blah database’ (since its on another hostname).

But now im unsure why they ask for hostname if it wont allow database name to be same.

I enter db name, and use the create new host option, but it says db name already taken.


#2

It might help you to understand if you realize that each of those different “hostnames” is just are an “alias” to the same server - hence the database names can’t be the same. :wink:

You don’t even need more than one hostname, actually, though many still create one for each domain (just to keep things “neat” and “organized”).

–rlparker