How To Add Additional Slave Server

Configuring New Slave Server

  1. Be sure slave server can telnet port 3306 to Master Server.
  2. Create a whi_catalog backup on any running slave server (ex.: 169.sophio.com) and copy it to the new slave server.
  3. Copy the following files from the running slave server to the new slave server under data directory of MySQL . You can find these files in the data directory of MySQL.
    • master.info
    • relay-log.info
    • relay-bin files (ex. u15410842-relay-bin.000525)
    • relay-bin.index (ex. u15410842-relay-bin.index)
    • certificates folder
  4. Rename the following files according to the server name of the new slave server.
    • relay-bin files
    • relay-bin.index file
  5. Change contents of the following files according to new relay-bin filenames and path of the certificates folder.
    • master.info - Change the correct directory of the certificates folder
    • relay-log.info - Change it according to the new relay-bin files.
    • relay-bin.idex - Change it according to the new relay-bin files.
  6. Stop MySQL in Services.
  7. Add the following lines in the my.ini of the MySQL Server under [mysqld] section. Be sure server-id is unique from slave servers.
    • old_passwords=1
    • ssl
    • server-id=3
    • master-connect-retry=60
    • replicate-do-db=whi_catalog
  8. Start MySQL in Services
  9. On MySQL shell, create whi_catalog database then restore the backup.
    • create database whi_catalog;
    • use whi_catalog;
    • source D:\backup\whi_catalog.sql;
    • quit;
  10. Finally start slave server.
    • start slave;
  11. Check slave status.
    • show slave status \G
  12. It is important that both Slave_IO_Running and Slave_SQL_Running have the value Yes in the output; otherwise, something went wrong--you should check your setup again and take a look at error log to find out about any errors. As you're using an SSL connection now, you should also find values in the fields Master_SSL_Allowed, Master_SSL_CA_File, Master_SSL_Cert, and Master_SSL_Key.
  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

How To Set Up MySQL Database Replication With SSL Encryption

Configuring Master Replication Server (217.sophio.com) Install OpenSSL and visual c++ 2008 in...