学习电脑,计算机系统故障维护,电脑技术,电脑知识学习-就上第二电脑网
当前位置: 首页 > 数据库 > mysql

mysql mha什么时候开始有的mysql 主从复制1201错误

 更新时间: 2019-11-02 19:23:25   作者:第二电脑网   来源:第二电脑网   浏览数:1754   我要评论

工作日志之-MySQL slave Replicatio EoDesciptio:mysql> stat slave;ERROR 1201 (HY000): Could ot iitialize maste ifo stuctue; moe eo messages ca be

工作日志之-MySQL slave Replication Error

Description:

mysql> start slave;

ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log

[root@slave ~]# tail /var/log/mysqld.log

090105 11:53:52 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000013' (relay_log_pos 235)

090105 11:53:52 [ERROR] Could not find target log during relay log initialization

...

[root@slave mysql]# ls /var/run/mysqld/

mysqld-relay-bin.000001 mysqld-relay-bin.000003 mysqld-relay-bin.000005 mysqld-relay-bin.index

mysqld-relay-bin.000002 mysqld-relay-bin.000004 mysqld-relay-bin.000006

[root@slave mysql]# cat master.info

14

mysql-bin.000010

1235

192.168.3.21

slave

29019853

3307

60

0

[root@slave mysql]# cat relay-log.info

/var/run/mysqld/mysqld-relay-bin.000013

235

mysql-bin.000010

1235

3

50703

Resolve solution:

[root@slave ~]# service mysqld stop

[root@slave mysql]# rm -fr master.info

[root@slave mysql]# rm -fr relay-log.info

[root@slave ~]# grep skip-slave-start /etc/my.cnf

skip-slave-start

[root@slave ~]# service mysqld start

[root@master ~]# mysql -uroot -p

mysql> show master status;

+------------------+----------+--------------+------------------+

| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |

+------------------+----------+--------------+------------------+

| mysql-bin.000011 | 98 | | |

+------------------+----------+--------------+------------------+

[root@slave ~]# mysql -uroot -p

mysql> change master to

master_log_file='mysql-bin.000011',

master_log_pos=98,

master_host='192.168.3.21',

master_port=3307,

master_user='slave',

master_password='12345678';

Query OK, 0 rows affected (0.02 sec)

mysql> start slave;

Query OK, 0 rows affected (0.00 sec)

mysql> show slave status\G

*************************** 1. row ***************************

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.3.21

Master_User: slave

Master_Port: 3307

Connect_Retry: 60

Master_Log_File: mysql-bin.000011

Read_Master_Log_Pos: 98

Relay_Log_File: mysqld-relay-bin.000002

Relay_Log_Pos: 235

Relay_Master_Log_File: mysql-bin.000011

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Replicate_Do_DB:

Replicate_Ignore_DB:

Replicate_Do_Table:

Replicate_Ignore_Table:

Replicate_Wild_Do_Table:

Replicate_Wild_Ignore_Table:

Last_Errno: 0

Last_Error:

Skip_Counter: 0

Exec_Master_Log_Pos: 98

Relay_Log_Space: 235

Until_Condition: None

Until_Log_File:

Until_Log_Pos: 0

Master_SSL_Allowed: No

Master_SSL_CA_File:

Master_SSL_CA_Path:

Master_SSL_Cert:

Master_SSL_Cipher:

第二电脑网从mysql mha什么时候开始有的mysql 主从复制1201错误分析来看,对mysql mha什么时候开始有的mysql 主从复制1201错误的结果。

Master_SSL_Key:

Seconds_Behind_Master: 0

1 row in set (0.00 sec)


更多:mysql mha什么时候开始有的mysql 主从复制1201错误
https://www.002pc.comhttps://www.002pc.com/mysql/5133.html

你可能感兴趣的主从复制,1201,mysql,错误

    关于我们 - 广告合作 - 联系我们 - 免责声明 - 网站地图 - 投诉建议 - 在线投稿

      浙ICP备140365454号

    ©CopyRight 2008-2020 002pc.COM Inc All Rights Reserved. 第二电脑网 版权所有 联系QQ:282523118