mysql主从复制Slave_IO_Running: No错误
在从服务器上show slave status\G;
mysql> show slave status\G;
*************************** 1. row ***************************
             Slave_IO_State: Connecting to master
                Master_Host: 10.11.5.225
                Master_User: slave
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: mysql-bin.000005
        Read_Master_Log_Pos: 362
             Relay_Log_File: mysqld-relay-bin.000001
              Relay_Log_Pos: 98
      Relay_Master_Log_File: mysql-bin.000005
           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: 362
            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.服务器进行授权访问权限问题,解决方法:
   mysql> grant replication slave on *.* to slave@10.11.5.170  identified by ‘123‘;
2. master_log_file和binlog_log_pos不一致,解决方法:
在主服务器上show master status;看下日志文件名和位置
在从服务器上slave stop;
       mysql> stop slave;
   mysql> change master to master_log_file='mysql-bin.000008',master_log_pos=98;
   mysql> start slave;
3.互为主从的服务器有一台slave未正常启动,解决方法:
change master to master_host='10.11.5.170';
4.两台服务器是否在同一网段,iptables是否把3306端口关了。