首页 > 其他分享 >主从复制(整理)

主从复制(整理)

时间:2022-11-06 22:56:11浏览次数:34  
标签:主从复制 log grant master mysql 整理 123456 root

//mysql8.0之前版本。设置主库
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

//mysql8.0以及之后版本。设置主库
create user 'root'@'%'identified by '123456';
grant all privileges on *.* to 'root'@'%' with grant option;

//mysql设置从库
change master to master_host='192.168.100.1',master_user='root',master_password='123456',master_log_file='mysql-bin.000016',master_log_pos=5555;

 

标签:主从复制,log,grant,master,mysql,整理,123456,root
From: https://www.cnblogs.com/stepforeward/p/16864528.html

相关文章