Configuring New Slave Server
- Be sure slave server can telnet port 3306 to Master Server.
- Create a whi_catalog backup on any running slave server (ex.: 169.sophio.com) and copy it to the new slave server.
- 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
- Rename the following files according to the server name of the new slave server.
- relay-bin files
- relay-bin.index file
- 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.
- Stop MySQL in Services.
- 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
-
- Start MySQL in Services
- 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;
- Finally start slave server.
- start slave;
- start slave;
- Check slave status.
- show slave status \G
- show slave status \G
- 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.