mysql主从配置常用命令

来源:互联网 发布:java中数组特点 编辑:程序博客网 时间:2024/06/05 08:32
授权远程用户权限(需要把my.cnf中的bind-address=127.0.0.1注释)
grant all privileges on *.* to username@'%' identified by 'password';
grant all privileges on *.* to username@'%' identified by 'password';


主从
show master status;
change master to Master_Log_File='mysql-bin.011558',Master_Log_Pos=605505007;
set global sql_slave_skip_counter =10000;start slave;


show slave status\G
stop slave;
start slave;
0 0