mysql> show slave status \G;
*************************** 1. row ***************************
             Slave_IO_State: Connecting to master
                Master_Host: 127.0.0.1
                Master_User: repl
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: master-bin.000019
        Read_Master_Log_Pos: 98
             Relay_Log_File: slave-relay-bin.000001
              Relay_Log_Pos: 98
      Relay_Master_Log_File: master-bin.000019
           Slave_IO_Running: No
          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: 98
            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
1 row in set (0.00 sec)ERROR:
No query specified

解决方案 »

  1.   

    查看了错误日志如下:
    190111 12:50:07 [ERROR] Slave I/O thread: error connecting to master '[email protected]:3306': Error: 'Can't connect to MySQL server on '127.0.0.1' (10061)'  errno: 2003  retry-time: 60  retries: 86400
    跪求大佬帮助!!!
      

  2.   

    你是一台机器跑两个实例吗?检查下MASTER实例是正常的吗?
    MASTER的repl用户密码是否被改动?
      

  3.   

    我是开启两个cmd 分别开启两个mysql服务,但是不能同时通过mysql -u root -p进入服务里,只能先关了一个再进另一个,有点麻烦。网上方法都找遍了,不管怎么都没用是显示的no。我怀疑和不能同时进入mysql服务里有关。因为都是本地连接嘛,所以只有127.0.0.1.
      

  4.   

    用两台docker分别搭MySQL服务器就行了