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

mysql主从同步从库同步报错的更多相关文章

  1. MySQL主从检验一致性工具pt-table-checksum报错的案例分析

    [问题] 有同事反馈我们改造过的MySQL5.7.23版本,使用pt-table-checksum工具比较主从数据库的一致性时报错 Unsafe statement written to the bi ...

  2. Sqoop- sqoop将mysql数据表导入到hive报错

    sqoop将mysql数据表导入到hive报错 [root@ip---- lib]# sqoop import --connect jdbc:mysql://54.223.175.12:3308/gx ...

  3. 通俗易懂地解决中文乱码问题(2) --- 分析解决Mysql插入移动端表情符报错 ‘incorrect string value: '\xF0...

    原文:[原创]通俗易懂地解决中文乱码问题(2) --- 分析解决Mysql插入移动端表情符报错 'incorrect string value: '\xF0... 这篇blog重点在解决问题,如果你对 ...

  4. Mysql only_full_group_by以及其他关于sql_mode原因报错详细解决方案

    Mysql only_full_group_by以及其他关于sql_mode原因报错详细解决方案 网上太多相关资料,但是抄袭严重,有的讲的也是之言片语的,根本不连贯(可能知道的人确实不想多说) 我总共 ...

  5. MySQL中遇到的几种报错及其解决方法

    MySQL中遇到的几种报错及其解决方法 1.[Err] 1064 - You have an error in your SQL syntax; check the manual that corre ...

  6. 【mybatis】【mysql】mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains no ...

  7. 安装mysql驱动之 mysqlclient 出现的报错处理(ubuntu16.04)

    首先 更新软件! sudo apt-get update 然后尝试安装mysqlclient,报错 后执行下面的步骤 安装mysql驱动之 mysqlclient 出现的报错信息处理 报错1: OSE ...

  8. kali linux 安装 Mysql Can't read from messagefile 报错解决方案

    1.下载安装包 下载地点:https://dev.mysql.com/downloads/mysql/ 或者 wget http://dev.mysql.com/get/Downloads/MySQL ...

  9. 【mysql】 load local data infield 报错 ERROR 1148 (42000): The used command is not allowed with this MySQL version

    mysql> load data local infile '/Users/flint/learn/mysql/pet' into table bx_pet; 执行报错 ERROR 1148 ( ...

  10. mysql修改后启动my.cnf报错Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

    mysql中文乱码解决 mysql修改my.cnf后启动报错Starting MySQL... ERROR! The server quit without updating PID file (/v ...

随机推荐

  1. Repeater动态添加行

    <table class="table table-striped table-bordered table-hover">            <asp:Re ...

  2. ios 项目被拒绝各种理由

    . Terms and conditions(法律与条款) 1.1 As a developer of applications for the App Store you are bound by ...

  3. 初识ege图形库

    简介: EGE (Easy Graphics Engine),是Windows 下的简易绘图库, 是一个类似BGI (graphics.h)的 面向C/C++语言新手的图形库,对新手来说,简单,友好, ...

  4. Binary Tree Level Order Traversal,Binary Tree Level Order Traversal II

    Binary Tree Level Order Traversal Total Accepted: 79463 Total Submissions: 259292 Difficulty: Easy G ...

  5. java学习一目了然——异常必知

    java学习一目了然--异常必知 我们只要学java,异常肯定非常熟悉,该抛的时候抛一下就行.但是这其中还有点小细节需要注意.就用这个小短篇来说一下异常处理中的小细节吧. 异常处理 RuntimeEx ...

  6. MySQL应用层传输协议分析

    001.在MySQL应用层传输协议中主要有如下三种类型的数据: 01.整数类型. 02.字符串类型. 03.描述数据包. 002.MySQL应用层传输协议中对整型的说明: 01.固定长度的整型---- ...

  7. 转的git

    原文链接:http://blog.csdn.NET/dengjianqiang2011/article/details/9260435 如果输入$ Git remote add origin git@ ...

  8. SpringBoot优化内嵌的Tomcat

    SpringBoot测试版本 <parent> <groupId>org.springframework.boot</groupId> <artifactId ...

  9. c++类模板中静态成员变量的声明定义

    我们知道,c++中,类的静态成员是要在.cpp文件中定义的,如果在.h中定义,会出现重复定义. 但是在写类模板时,一般所有的代码都是放在.h文件中的,如果要做分离是一件很麻烦的事.那如果出现了静态成员 ...

  10. hdu 1754 I Hate It_线段树

    题意:略 思路:套hdu1166模版改改就行了,要注意的是,网上有的代码是错的,还贴出来... #include <iostream> #include<cstdio> #in ...