7.2、mysql备份数据库

  • Post author:
  • Post category:mysql


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



版权声明:本文为ynthua原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。