Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application running in one server eg: My Server's Ip is, and I have the MySQL database server in the same machine. The application connects database server as localhost.

However, I have rented new server now and the IP is, it also has its own MySQL database server.

My quest is, I want this new server to be the slave of old server. I don't want to copy the Application to New Server, however I want the application in (old server) to access the database of New slave server without exploiting security risks. The reason I want this is to send the read queries to new server, and write queries would be served by same old server.

Please guide me how to achieve this.

share|improve this question
A good starting point is the comprehensive MySQL howto: – Emyl Oct 4 '13 at 12:33
Jhilke Dai, your question touches on some of the basics of replication. The process and its component stages can be quite difficult for the uninitiated to follow, so for your purposes and others', I am sharing an excellent tutorial on the topic. You don't say clearly which version of MySQL you are using. The tutorial describes work with 5.6. It's here: – Lena Weber Oct 15 '13 at 21:03

Your Answer


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

Browse other questions tagged or ask your own question.