MySQL的错误:No query specified
在做MySQL主从同步的时候通过:
mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.18.139 Master_User: rep Master_Port: 3307 Connect_Retry: 60 Master_Log_File: mysql-bin.000001 Read_Master_Log_Pos: 107 Relay_Log_File: relay-bin.000002 Relay_Log_Pos: 253 Relay_Master_Log_File: mysql-bin.000001 Slave_IO_Running: Yes Slave_SQL_Running: Yes Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Master_Server_Id: 3 1 row in set (0.00 sec) ERROR: No query specified ==>出现此错误
出现此错误的原因是因为执行命令:show slave status\G;的时候,多加了一个“;”分号。
当执行命令的时候去掉分号,就不会出现此错误。
mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.18.139 Master_User: rep Master_Port: 3307 Connect_Retry: 60 Master_Log_File: mysql-bin.000001 Read_Master_Log_Pos: 107 Relay_Log_File: relay-bin.000002 Relay_Log_Pos: 253 Relay_Master_Log_File: mysql-bin.000001 Slave_IO_Running: Yes Slave_SQL_Running: Yes Seconds_Behind_Master: 0 1 row in set (0.00 sec) mysql>