MySQL Error: last_errno:1008 | last_sql_errno:1008

Source: Internet
Author: User


MySQL master-slave replication is not synchronized, view slave status, The error is as follows:

mysql> show slave status \g*************************** 1. row **********                 slave_io_state: waiting for master to send event                   master_host: 192.168.0.134                    master_user: slave                   Master_Port: 3306                 Connect_Retry: 60               Master_Log_File: master-bin.000006           read_master_log_pos: 520                Relay_Log_File: relay-log-bin.000028                 Relay_Log_Pos: 252         relay_master_log_file: master-bin.000006              Slave_IO_Running: Yes             Slave_SQL_Running: No               replicate_do_db:           replicate_ignore_db:             Replicate_Do_Table:         replicate_ignore_table:       replicate_wild_ Do_table:  &nbsP replicate_wild_ignore_table:                     Last_Errno: 1008                    Last_Error: Error  ' Can ' t  drop database  ' AAA ';  database doesn ' t exist '  on query. default  database:  ' . query:  ' drop database aaa '                   Skip_Counter: 1           Exec_Master_Log_Pos: 356               Relay_Log_Space: 868               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: nullmaster_ssl_verify_server_cert:  no                last_ Io_errno: 0                last_io_error:                 Last_SQL_Errno: 1008                last_sql_error: error   ' Can ' t drop database  ' aaa ';  database doesn ' t exist '  on query.  Default database:  ' . query:  ' drop database aaa ' 1 row in  set  (0.00 SEC)

workaround:

mysql> stop slave; query ok, 0 rows affected  (0.00 sec) MySQL > set global sql_slave_skip_counter = 1; #  move the sync pointer down one to repeat the operation Mysql>  start slave; query ok, 0 rows affected  (0.00 sec) mysql> show slave status  \G*************************** 1. row ***************************                Slave_IO_State: Waiting for  master to send event                   Master_Host: 192.168.0.134                   Master_User: slave                   Master_Port:  3306                connect_retry:  60              master_log_file:  master-bin.000006          Read_Master_Log_Pos:  520               relay_log_file:  relay-log-bin.000030                 relay_log_pos: 252        relay_master_log_file:  master-bin.000006             slave_io_ Running: yes            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: 520               Relay_Log_Space: 551               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: 0master_ssl_verify_server_cert:  no                last_io_errno: 0                 Last_IO_Error:                 Last_SQL_Errno: 0                last_sql_error: 1 row  in set  (0.00 SEC)


This article is from "Big Brother next Door" blog, please be sure to keep this source http://guoxh.blog.51cto.com/10976315/1922691

MySQL Error: last_errno:1008 | last_sql_errno:1008

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.