Mysql5.7 migration and upgrade from library to master library
CHANGE MASTER TOMASTER_HOST='10.10.30.34', MASTER_PORT=3306,MASTER_USER='slave',MASTER_PASSWORD='slave',MASTER_LOG_FILE='mysql-bin.000148',MASTER_LOG_POS=154; changed from database to main library stop slave;reset slave;reset master Change from the library to the previous master library (from the slave library to the master database) vim / etc/my.cnflog-bin=mysql-bin # and restart the database Master library opens binlog log master library operation: show master status master library operation: scp-r / var/lib/mysql/* 10.10.50.34:/var/lib/mysql/ slave library: chown-R mysql.mysql / var/lib/mysql/ slave library: systemctl restart mysqld CHANGE MASTER TOMASTER_HOST='172.16.1.51', MASTER_PORT=3306,MASTER_USER='rep',MASTER_PASSWORD='123456',MASTER_LOG_FILE='mysql-bin.000001',MASTER_LOG_POS=335 Enter data: start slave; intermediate error report: 1.IO process has been in connnecting slave user password error 2.show slave status; reported error Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file' solution: main library: flush logs Slave library: stop slave;CHANGE MASTER TO MASTER_LOG_FILE='mysqld-bin.000011',MASTER_LOG_POS=106;start slave