MySQL master-slave synchronization Error record.

Source: Internet
Author: User

MySQL master-slave synchronization failed because the master followed already has the same data in it.


Workaround: Add the following code to the/ETC/MY.CNF from the library

[Mysqld]

Slave-skip-errors = 1032,1062,1007,1050


Case one:

Mysql> Show Slave Status\g

1. Row ***************************

Slave_io_state:waiting for Master to send event

master_host:172.20.18.166

Master_user:rep

master_port:3306

Connect_retry:60

master_log_file:mysql-bin.000003

read_master_log_pos:237

relay_log_file:abu-relay-bin.000002

relay_log_pos:253

relay_master_log_file:mysql-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:1007

Last_error:error ' Can ' t create database ' Abu '; Database exists ' on query. Default database: ' Abu '. Query: ' Create Database Abu '

skip_counter:0

exec_master_log_pos:107

relay_log_space:1859

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:1007

Last_sql_error:error ' Can ' t create database ' Abu '; Database exists ' on query. Default database: ' Abu '. Query: ' Create Database Abu '

Replicate_ignore_server_ids:

Master_server_id:1

1 row in Set (0.00 sec)


Case TWO:

Mysql> Show Slave Status\g

1. Row ***************************

Slave_io_state:waiting for Master to send event

master_host:172.20.18.166

Master_user:rep

master_port:3306

Connect_retry:60

master_log_file:mysql-bin.000003

read_master_log_pos:237

relay_log_file:abu-relay-bin.000002

relay_log_pos:253

relay_master_log_file:mysql-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:1007

Last_error:error ' Can ' t create database ' Abu '; Database exists ' on query. Default database: ' Abu '. Query: ' Create Database Abu '

skip_counter:0

exec_master_log_pos:107

relay_log_space:1859

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:1007

Last_sql_error:error ' Can ' t create database ' Abu '; Database exists ' on query. Default database: ' Abu '. Query: ' Create Database Abu '

Replicate_ignore_server_ids:

Master_server_id:1

1 row in Set (0.00 sec)




Workaround: Add the following code to the/ETC/MY.CNF from the library

[Mysqld]

Slave-skip-errors = 1032,1062,1007,1050


This article is from the "11002498" blog, please be sure to keep this source http://11012498.blog.51cto.com/11002498/1878494

MySQL master-slave synchronization Error record.

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.