MySQL Forums
Forum List  »  Newbie

Re: Using DNS aliases to manage database connections
Posted by: Phillip Ward
Date: April 23, 2021 08:00AM

Indeed, they can.

Databases run on [server] host machines.
Every host machine has a Name.
Every host machine has an I.P. Address.
These two are, largely, interchangeable.

Say you have a database server machine called "aardvark", with I.P. Address You use this server for Development work.
Say you also have a Production database server called "P05M6345", with I.P. Address

Neither of these are particularly meaningful to you when try to work out which one to connect your Development software!

A DNS Alias allows you to give multiple "names" to the same I.P. Address.

So you could create two aliases:

myApp-Devt -> (aardvark)
myApp-Prod -> (P05M6345)

Now, you use these names in your application configuration.

Also note that when your current Production machine is replaced by a newer. shinier one (it happens!), you simply move the DNS Alias (myApp-Prod) to point to the new Server. Nothing else needs to change!

myApp-Devt -> (aardvark)
myApp-Prod -> (P05M10872)

Regards, Phill W.

Options: ReplyQuote

Written By
Re: Using DNS aliases to manage database connections
April 23, 2021 08:00AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.