mysql 互为主从复制常见问题
2014-09-19 11:14
585 查看
报错: 1) change master导致的: Last_IO_Error: error connecting to master - retry-time: 60 retries 2) 在没有解锁的情况下停止slave进程: stop slave; ERROR 1192 (HY000): Cant execute the given command because you have active locked tables
报错:
1)
change master导致的:
Last_IO_Error: error connecting to master - retry-time: 60 retries2)
在没有解锁的情况下停止slave进程:
> stop slave;
ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction3)
change master语法错误,落下逗号
mysql> change master to
-> master_host='IP'
-> master_user='USER',
-> master_password='PASSWD',
-> master_log_file='mysql-bin.000002',
-> master_log_pos=106;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'master_user='USER',
master_password='PASSWD',
master_log_file='mysql-bin.000002' at line 3 4)
在没有停止slave进程的情况下change master
mysql> change master to master_host=‘IP', master_user='USER', master_password='PASSWD', master_log_file='mysql-bin.000001',master_log_pos=106;
ERROR 1198 (HY000): This operation cannot be performed with a running slave; run STOP SLAVE first 5)用change master语句指定同步位置出错,修改master_log_file和master_log_pos参数:
Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'bogus data in log event', Error_code: 1236
6 )A B的server-id相同:
Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids;
these ids must be different for replication to work (or the --replicate-same-server-id option must be used on
slave but this does not always make sense; please check the manual before using it).
查看server-id
mysql> show variables like 'server_id';
手动修改server-id
mysql> set global server_id=2; #此处的数值和my.cnf里设置的一样就行
mysql> slave start;
7)change master之后: Could not initialize master info structure, more error messages can be found in the MySQL error log 1.mysql> reset slave; # 重点就是这行
2.mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107; # 请依照自行环境设定
3.mysql> start slave; # 就正常了重新设置 slave, MASTER_LOG_FILE 和 MASTER_LOG_POS 会被清空, 所以需要重新设置:
报错:
1)
change master导致的:
Last_IO_Error: error connecting to master - retry-time: 60 retries2)
在没有解锁的情况下停止slave进程:
> stop slave;
ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction3)
change master语法错误,落下逗号
mysql> change master to
-> master_host='IP'
-> master_user='USER',
-> master_password='PASSWD',
-> master_log_file='mysql-bin.000002',
-> master_log_pos=106;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'master_user='USER',
master_password='PASSWD',
master_log_file='mysql-bin.000002' at line 3 4)
在没有停止slave进程的情况下change master
mysql> change master to master_host=‘IP', master_user='USER', master_password='PASSWD', master_log_file='mysql-bin.000001',master_log_pos=106;
ERROR 1198 (HY000): This operation cannot be performed with a running slave; run STOP SLAVE first 5)用change master语句指定同步位置出错,修改master_log_file和master_log_pos参数:
Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'bogus data in log event', Error_code: 1236
6 )A B的server-id相同:
Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids;
these ids must be different for replication to work (or the --replicate-same-server-id option must be used on
slave but this does not always make sense; please check the manual before using it).
查看server-id
mysql> show variables like 'server_id';
手动修改server-id
mysql> set global server_id=2; #此处的数值和my.cnf里设置的一样就行
mysql> slave start;
7)change master之后: Could not initialize master info structure, more error messages can be found in the MySQL error log 1.mysql> reset slave; # 重点就是这行
2.mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107; # 请依照自行环境设定
3.mysql> start slave; # 就正常了重新设置 slave, MASTER_LOG_FILE 和 MASTER_LOG_POS 会被清空, 所以需要重新设置:
相关文章推荐
- mysql 互为主从复制常见问题
- mysql 互为主从复制常见问题
- mysql 互为主从复制常见问题
- MySQL5.0 与MySQL5.5 主从复制 常见问题处理方法
- Mysql主从复制以及常见错误问题分析
- mysql主从复制碰到的小问题
- Mysql主从复制的配置(双机互为主从)
- MySQL 配置主从常见问题解决
- MySQL主从复制中关于AUTO_INCREMENT的奇怪问题
- MySQL主从复制数据不一致问题【自增主键】
- mysql主从搭建常见问题及解决方案
- mysql互为主从复制配置笔记
- mysql中主从复制延迟问题
- mysql互为主从复制配置笔记
- mysql互为主从复制配置
- mysql主从复制不同步问题
- mysql主从复制——双机互为主从
- MySQL主从复制问题解决一例 推荐
- MySQL主从复制中关于AUTO_INCREMENT的奇怪问题
- Mysql互为主从问题--日志同步数据不同步