首页 > 解决方案 > MySQL从主错误连接到主

问题描述

我在 Manjaro 上使用 MySQL,我必须进行复制(主从)。问题是我无法收到“Slave_IO_State: Waiting for master to send event”的消息,它只是留在“Connecting to master”,如果你能帮助我,我会很高兴提前谢谢!!!

MariaDB [(none)]> SHOW SLAVE STATUS\G
*********************** 1. row ***********************
                Slave_IO_State: Connecting to master
                   Master_Host: 192.168.100.3
                   Master_User: replicauser
                   Master_Port: 3306
                 Connect_Retry: 60
               Master_Log_File: mysql-bin.000017
           Read_Master_Log_Pos: 2004
                Relay_Log_File: yisus-hppaviliong4notebookpc-relay-bin.000001
                 Relay_Log_Pos: 4
         Relay_Master_Log_File: mysql-bin.000017
              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: 2004
               Relay_Log_Space: 256
               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 'replicauser@192.168.100.3:3306' - retry-time: 60  maximum-retries: 100000  message: Access denied for user 'replicauser'@'192.168.100.11' (using password: YES)
                Last_SQL_Errno: 0
                Last_SQL_Error: 
   Replicate_Ignore_Server_Ids: 
              Master_Server_Id: 1
                Master_SSL_Crl: 
            Master_SSL_Crlpath: 
                    Using_Gtid: No
                   Gtid_IO_Pos: 
       Replicate_Do_Domain_Ids: 
   Replicate_Ignore_Domain_Ids: 
                 Parallel_Mode: optimistic
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
              Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 0
1 row in set (0.000 sec)

这是 Slave 的配置文件 在此处输入图像描述

这是大师

MariaDB [(none)]> SHOW MASTER STATUS\G
*************************** 1. row ***************************
            File: mysql-bin.000017
        Position: 2004
    Binlog_Do_DB: 
Binlog_Ignore_DB: 
1 row in set (0.000 sec)

这是 Master 的配置文件 在此处输入图像描述

标签: mysqllinuxmaster-slavemanjaro

解决方案


推荐阅读