本文转自https://www.cnblogs.com/hellotracy/articles/5183057.html因为碰到同样的问题所以记录下。

很多时候,就算thread 正在进行,也不代表没有错误,一定要看看具体表示错误的变量

mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: 192.168.1.107
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000045
Read_Master_Log_Pos: 107
Relay_Log_File: CENTOS6-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000045
Slave_IO_Running: Connecting
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: 107
Relay_Log_Space: 107
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:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1045
Last_IO_Error: error connecting to master 'repl@192.168.1.107:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
1 row in set (0.00 sec)

一个变量可能承载不了那么多的错误信息,要看详细的错误信息就要看错误日志

160204 18:27:37 [Note] Error reading relay log event: slave SQL thread was killed
160204 18:27:37 [Note] Slave I/O thread killed while connecting to master
160204 18:27:37 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000045', position 107
160204 18:27:48 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='centos7', master_port='3306', master_log_file='', master_log_pos='4'. New state master_host='192.168.1.107', master_port='3306', master_log_file='mysql-bin.000045', master_log_pos='107'.
160204 18:27:52 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000045' at position 107, relay log '/usr/local/mysql/data/CENTOS6-relay-bin.000001' position: 4
160204 18:27:52 [ERROR] Slave I/O: error connecting to master 'repl@192.168.1.107:3306' - retry-time: 60 retries: 86400, Error_code: 1045

不过也没有更多的信息,查一下错误代号

查询了一下master的登陆表

这句话的意思是,来自192.168.1.108这个地方的人,可以使用master机器上的一个叫做repl的账号,但是‘repl’@'192.168.1.108'这个账号可以做一些什么东西,不能做一些什么东西呢,这个需要看他的权限,也就是他的能力,因为可能不止一项权利,所以用了复数grants

可以看到它是没有经过授权的,我们现在可以对他授权,仅仅是一个“进行复制”的权利,授权完以后需要确认一下

现在重新使用replication功能,其实不需要start slave去开启,它自己就会自动开启的

mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.107
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000045
Read_Master_Log_Pos: 3220
Relay_Log_File: CENTOS6-relay-bin.000002
Relay_Log_Pos: 3366
Relay_Master_Log_File: mysql-bin.000045
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: 3220
Relay_Log_Space: 3524
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:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.00 sec)

[trouble] error connecting to master 'repl@192.168.1.107:3306' - retry-time: 60 retries: 86400的更多相关文章

  1. error connecting to master 'repl@192.168.1.107:3306' - retry-time: 60 retries: 86400

    很多时候,就算thread 正在进行,也不代表没有错误,一定要看看具体表示错误的变量 mysql> show slave status\G *************************** ...

  2. 1045 | error connecting to master 'slave_user@192.168.0.75:3306' - retry-time: 6

    mysql 主从复制问题整理   问题:      1045 | error connecting to master 'slave_user@192.168.0.75:3306' - retry-t ...

  3. mysql 8.x 集群出现:Last_IO_Error: error connecting to master 'repl@xxx:3306' - retry-time: 60 retries: 1

    网上的经验:网络不同,账号密码不对,密码太长,密码由 # 字符:检查MASTER_HOST,MASTER_USER,MASTER_PASSWORD(不知道 MASTER_LOG_FILE 有没有影响) ...

  4. 【转载】MySQL 5.6主从Slave_IO_Running:Connecting/error connecting to master *- retry

    原文地址:MySQL 5.6主从Slave_IO_Running:Connecting/error connecting to master *- retry 作者:忆雨林枫 刚配置的MySQL主从, ...

  5. MySQL 5.6主从Slave_IO_Running:Connecting/error connecting to master *- retry

    刚配置的MySQL主从,在从机上看到 点击(此处)折叠或打开 mysql> SHOW slave STATUS \\G *************************** 1. row ** ...

  6. 两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Error: error connecting to master ……

    两台主机A.B搭建mysql主从复制关系(A为master,B为slave)后,在slave上执行show slave status,结果中显示Last_IO_Error: error connect ...

  7. [置顶] 两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Error: error connecting to master ……

    两台主机A.B搭建mysql主从复制关系(A为master,B为slave)后,在slave上执行show slave status,结果中显示Last_IO_Error: error connect ...

  8. 安装禅道提示:ERROR: 您访问的域名 192.168.110.128 没有对应的公司

    您访问的域名 192.168.110.128 没有对应的公司. in /usr/local/nginx/html/zentaopms/module/common/model.php on line 8 ...

  9. dcloud_base连接失败(root:admin123!@#qwe@tcp(192.168.8.205:3306)/dcloud_base) Error 1129: Host '192.168.8.205' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

    mysql -uroot -p admin123!@#qwe show global variables like '%max_connect_errors%'; set global max_con ...

随机推荐

  1. abaqus python库变强变大233333333333333

    有没有小伙伴想在 至于怎么安装pip 度小娘一位大神提供了办法  https://jingyan.baidu.com/article/7e4409533f32092fc0e2ef24.html 如有需 ...

  2. js判断页面在pc端打开还是移动端打开

    js判断页面在pc端打开还是移动端打开,分别跳转不同的index.html window.addEventListener('load', function() { // true为手机,false为 ...

  3. Node.Js http服务(websocket)

    安装node,下载地址 https://nodejs.org/en/ cmd 中 输入 node -v 安装成功可以查看版本 cmd 中 ctrl - c 可以 结束 和 启动 编辑 js 文本 va ...

  4. Matlab 2017b遇到绘图低级错误

    解决方案: 命令窗口中输入:opengl('save','software') 回车 重启软件

  5. JZ2440支持设备树(1)-添加设备树之后kernel的启动参数跟dts里面不一致

    在做之前参考了如下博客文章,再次非常感谢: http://www.cnblogs.com/pengdonglin137/p/6241895.html Uboot中需要在config中添加如下宏: #d ...

  6. 使用python编辑和读取word文档

    python调用word接口主要用到的模板为python-docx,基本操作官方文档有说明. python-docx官方文档地址 使用python新建一个word文档,操作就像文档里介绍的那样: fr ...

  7. Java_02变量、数据类型和运算符

    1.变量命名规则 变量必须以字母.下划线 " _ " 或 " $ " ( " ¥ " ) 符号开头. 变量可以包括数字,但不能以数字开头. ...

  8. Poj2688cleaningrobot

    这道题让我们求一个地图上的各个点之间的最短路径说白了旅行商问题. 那么我们先用一个裸的BFS求出各个点之间的最短距离,然后我们再枚举各个点的全排列即可 这道题的细节很多,详见注释 上代码~ #incl ...

  9. webpack学习笔记(四)

    1 webpack的垫片 举个例子,在main文件中引入jquery和doash两个库: import $ from 'jquery'; import _ from 'lodash'; import ...

  10. proxmox网络

    root@t1:~# cat /etc/network/interfaces# network interface settings; autogenerated# Please do NOT mod ...