数据库复制|错误“在用户表中找不到任何匹配的行”

时间:2019-06-28 08:36:11

标签: mysql mariadb virtual-machine database-replication master-slave

我正在尝试同步两个MySQL数据库。我使用MariaDB。我的主服务器在Windows中运行,而从服务器在虚拟机中。 (Arch Linux)

我遵循了 https://mariadb.com/kb/en/library/setting-up-replication/

我使用“ mysqldump”命令复制了数据库

错误:

MariaDB [(none)]> SHOW SLAVE STATUS /G;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/G' at line 1
MariaDB [(none)]> SHOW SLAVE STATUS \G;
*************************** 1. row ***************************
                Slave_IO_State: Waiting for master to send event
                   Master_Host: 192.168.0.165
                   Master_User: replication_user
                   Master_Port: 3306
                 Connect_Retry: 10
               Master_Log_File: master1-bin.000001
           Read_Master_Log_Pos: 842
                Relay_Log_File: arch01-relay-bin.000002
                 Relay_Log_Pos: 631
         Relay_Master_Log_File: master1-bin.000001
              Slave_IO_Running: Yes
             Slave_SQL_Running: No
               Replicate_Do_DB:
           Replicate_Ignore_DB:
            Replicate_Do_Table:
        Replicate_Ignore_Table:
       Replicate_Wild_Do_Table:
   Replicate_Wild_Ignore_Table:
                    Last_Errno: 1133
                    Last_Error: Error 'Can't find any matching row in the user table' on query. Default database: ''. Query: 'SET PASSWORD FOR 'replication_user'@'%'='*F17EF70C698E842217C611D2DE306769B1F6697C''
                  Skip_Counter: 0
           Exec_Master_Log_Pos: 330
               Relay_Log_Space: 1453
               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: 0
                 Last_IO_Error:
                Last_SQL_Errno: 1133
                Last_SQL_Error: Error 'Can't find any matching row in the user table' on query. Default database: ''. Query: 'SET PASSWORD FOR 'replication_user'@'%'='*F17EF70C698E842217C611D2DE306769B1F6697C''
   Replicate_Ignore_Server_Ids:
              Master_Server_Id: 1
                Master_SSL_Crl:
            Master_SSL_Crlpath:
                    Using_Gtid: Slave_Pos
                   Gtid_IO_Pos: 0-1-3
       Replicate_Do_Domain_Ids:
   Replicate_Ignore_Domain_Ids:
                 Parallel_Mode: conservative
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State:
              Slave_DDL_Groups: 1
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 0

0 个答案:

没有答案