Hostnames and domain names: their relationship?
Posted by: Nico
Posted on: 2007-12-18 03:18:00
I'm trying to undetstand the relationship (structural and operational) between MySQL Hostnames and domain names. I'm hoping someone can shine some light.
For context, I host several domains on my account. On the "Manage MySQL" page, I'm presented with an outline of my MySQL resources. On my page are two MySQL Severs -- each with a two part name in the format partone:parttwo. I'm assuming that these are just the names of the physical servers on which my databases reside.
Each of these server names has below it an area for Hostnames. One of the servers lists only one Hostname, and the second one lists three. Most of these Hostnames are named in the format mysql.domainname.com, for the different domains I associate their use with.
At the top of the Hostname section that lists three Hostnames, it says that the three Hostnames "are interchangeable." When I look at these using phpMyAdmin, they do in fact seem identical, each containing the same databases and tables.
So some questions:
1) If these Hostnames are interchangeable, what reasons might I have for creating a new one when I create a new database? Being interchangeable, the new db shows up in all of the other Hostnames on that server anyway. So what am I gaining, other than a name association between the Hostname and the database? I like that. But is that it?
2) When I create a new Hostname and select (from the dropdown box) one of my domains for its name -- e.g., mysql.domainname.com -- what is its actual relationship to that domain? The databases themselves are listed as being "on this server," yet they appear to be structurally "under" the Hostaname -- and all the databases on that server are fully accessible from any one of the interchangeable Hostnames. So again, what exactly does the Hostname do?
3) How did I end up on two different servers? Is it possible to move the database that is under the single Hostname on the first server, to the second server, so they are all grouped together (if onyl for organizational reasons)?
4) Is it possible to make the Hostnames not "interchangeable." Maybe I'm missing something, but it seems that would be more useful, from the pov of organizing projects and associating them by name. Instead, it just seems to be one big pool of databases, and a bunch of Hostnames that differ only in their names.
5) Is there more to this than just a potentially VERY cluttered interface with redundant options?
This all seems more confusing than it should be. But I'm unable to find a clear and simple and to the point explanation of the relationship between these different elements. It's not that I'm unable to get things working, usually, but it would be nice to have a better understanding of what the options I'm being presented with mean.
All insight appreciated.