Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to create a new user in mysql which will be able to connect only from my servers. I've seen a way to do it through IP ranges or domain names (e.g. CREATE USER 'repl'@'%.mydomain.com' IDENTIFIED BY 'slavepass'; )

Can I somehow (by changing hostnames, hosts files or such) define a domain of servers which talk to each other through this user, without involving a real DNS server?

share|improve this question

1 Answer 1

If you want to use names instead of IPs, you can use a DNS server which will resolve the names to IPs. Alternatively, you need to include the used names in the hosts file of each machine you want to be able to resolve these names.

If you have many names/machines, setting up a local DNS server can be easier than maintaining a long list of names in many hosts files located on many machines.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.