Naming a mysql server

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Naming a mysql server

Post by RobertGonzalez »

Does anyone know what the proper search term would be for giving your mysql server a name? What I am looking to do specifically is create several servers on various machines that will be used for dev/test/prod. I want them to be named servers so we can connect to them from any other machine on the network. So...

On our dev machine right now, I can connect to localhost only. I want to be able to connect to mysql-dev.domain.com from anywhere in our network. I also want to be able to connect to mysql-prod.domain.com. Does anyone know what this is called or know what I should be searching for?

I am not ready to ask you how to do it as I have not even been able to search for it yet. All help is, as always, appreciated.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

google

jk...

The easy way would to just edit your host file and add the ip's for each name.
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

I use monowall's DNS forwarder for this. Its like a mini dns server with a static table, it checks its internal table first, then forwards the request onto the main DNS server. You just have to set all your client PCs to use the forwarder as their DNS server.

This is also handy if you have say myserver.domain.com pointing to your public IP and that entry is published on your live DNS server. From within your network trying to access the myserver.domain.com pointer will crap out, but with a DNS forwarder you can map it to the private IP, then you can use that pointer from inside and outside your private network.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Yeah I believe what your looking for would be a local DNS server. If these are linux boxes it shouldn't be too hard to setup, although I have never done it.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Thanks guys. I think that gives me enough to start searching properly.
Post Reply