Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql5.7 migration and upgrade from library to master library

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report