How to match DB with hostname?


#1

How can I tell which databases are hosted on which mysql hostname?

Right now I have 8 databases and 4 hostnames, but I no longer need the domain that one of the host names is tied to, so I want to let it expire next week. However, I think I may have made an error on one of my other websites and set the database to the mysql hostname on the website I want to trash, and I’m afraid to let it go without knowing for sure. How can I tell which databases are hosted on the mysql host that I want to get rid of?

I must be missing something obvious. Thanks for your help.


#2

Yes. Let’s take a look at the MySQL Databases page in the DreamHost Web Panel.

There is a particular server running the MySQL software. So first we have a server identifier:
“server name” MySQL Server

Next we have a list of hostnames that DNS resolves to the IP address of the mysql server.

"Hostnames for this MySQL server:

  • Add New Hostname
    Hostname (these are all interchangeable)"

Then we have a list of databases on this MySQL server:
“Database(s) on this server:
Database”

The database is hosted on the server, and the hostname points to the server. So you can have more than one hostname point to the same server, and thus no matter which hostname you choose you can access the database.

So what you want to do is determine the MySQL server the database is on, then choose a hostname that you are keeping for that server, and then configure the scripts on the web sites to use that hostname and the user that is given access to the database.

Customer since 2000 :cool: openvein.org


#3

Thank you so much, Atropos7. I saw that they were interchangeable but I didn’t understand how to do that. I appreciate your help.