zoukankan      html  css  js  c++  java
  • mysql主从同步从库同步报错

    1.在从库上设置master_info信息时出错

    mysql> change master to master_host='192.168.157.143',master_port=3306,master_user='backup',master_password='redhat',master_log_file='mysql-bin.000002',master_log_pos=597;

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

    2.解决方法

    mysql> slave stop;     <--停掉slave

    Query OK, 0 rows affected, 1 warning (0.00 sec)

    mysql> reset slave;    <--重设置一个slave;

    Query OK, 0 rows affected (0.00 sec)

    mysql> change master to master_host='192.168.157.143',master_port=3306,master_user='backup',master_password='redhat',master_log_file='mysql-bin.000002',master_log_pos=597;    <--再次设置同步信息

    Query OK, 0 rows affected (0.05 sec)

    mysql> slave start;                        <--启动slave

    Query OK, 0 rows affected (0.00 sec)

    mysql> show slave status G;        <--同步正常

      Slave_IO_Running: Yes
      Slave_SQL_Running: Yes

  • 相关阅读:
    ZOJ Bookcase
    C*++ Calculations
    STL <cctype>
    线段树单点更新+区间更新
    ZOJ Supermarket
    STL <cassert>
    算法导论<二>
    MV Maker [DP]
    LIS 最长有序子序列(递增/递减/非递增/非递减)
    LIS
  • 原文地址:https://www.cnblogs.com/LD-linux/p/3394726.html
Copyright © 2011-2022 走看看