1、修改配置文件:vim /etc/my.cof
[mysqld]
log-bin=mysql-bin(名字可以改成自己的,如果不改名字的话,默认是以主机名字命名)
2、重新启动MSYQL服务:systemctl restart mariadb
3、查看自己的BINLOG的名字是什么:show binlog events
[mysqld]
log-bin=mysql-bin(名字可以改成自己的,如果不改名字的话,默认是以主机名字命名)
2、重新启动MSYQL服务:systemctl restart mariadb
3、查看自己的BINLOG的名字是什么:show binlog events
4、把数据导入mariadb:mysqlbinlog --start-position=100 --stop-position=200 mysql-bin.000001 | mysql -uroot -p123456
本文转自 Lee_吉 博客,原文链接: http://blog.51cto.com/12173069/2047756 如需转载请自行联系原作者