sed -i ‘N;6alog-bin=128’ a.txt
sed -i ‘N;6aserver-id=128’ a.txt
service mysqld restart
mysql -u root -p
CREATE USER ‘slave_cp’@’%.example.com’ IDENTIFIED BY ‘SlaveAdmin’;
GRANT REPLTCATION SLAVE ON *.* TO ‘slave_cp’@’%.example.com’;
GRANT REPLICATION SLAVE ON *.* TO ‘skave_cp’@’%.example.com’;
exit
mysql -u root -p
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
UNLOCK TABLES;
mysqldump -u root > /root/linux.sql
scp
/root/linux.sql
root@
192.168.44.129
:/
test
参考文档
https://www.cnblogs.com/aaronguo/p/10056012.html
https://blog.csdn.net/wmsjlihuan/article/details/7282015