Domain/mysqlhostname

software development

#1

I’m new to php/mysql, so this may sound a bit silly:

Is it (un)cool to have a sub-domain name (say, fingernail.dreamhost.org) match a mysql database hostname verbatim?

If you are wondering why I would do such a thing, I’m trying to get access to my databases via Dreamweaver MX’s new and obstructively easy testing server/ftp method and I’m running low on ideas…


#2

yes.

the MySQL hostname should be unique (and I’m pretty sure that we won’t allow you to add a hosted domain that has the same name as a database hostname, and vice-versa).

since adding the MySQL hostname adds an A record pointing to the database machine for foo.example.com, you’ll get something like:

foo IN A 1.2.3.4 ; database machine
foo IN A 1.2.2.6 ; web machine

this means that people trying to view your site will get very erratic results. (this has happened to a couple of customers in the past when bugs in our system have allowed them to add a subdomain with the same name as a database hostname).

if you’re feeling uninspired, just call it ‘mysql.example.com’ or something boring like that.