1.修改配置文件 vi /etc/my.cnf log-bin = binlog systemctl restart mysqld mysql -uroot -p123456 mysql> show variables like 'log_bin' ; mysql> show VARIABLES like '%log_bin%'; ls /var/lib/mysql/ 2.创建数据库 create database mytest; use mytest; create table t(a in…
备份全库 [root@db01 b]# mysqldump -uroot -poldboy123 -A > /b/full.sql Warning: Using a password on the command line interface can be insecure. [root@db01 b]#ll total 656 -rw-r--r-- 1 root root 667860 Mar 11 15:39 full.sql 打开看下都是一些插入类的语句比较容易读懂,可以用awk.sed,…