Skip wrong way from the main MySQL replication

Open GTID copy mode is slightly more complicated from the master
1, replication status queries from the main
show slave status \ G
query can query GTID replication_applier_status_by_worker table point information to the error current.
select * from performance_schema.replication_applier_status_by_worker \ G

stop slave;
set @@session.gtid_next='f19da1b4-7931-11e9-874c-c4b8b45d7bbe:16383';
commit;
set @@session.gtid_next=automatic;
start slave;
show slave status\G

MySQL common error types

1005: table creation failed
1006: Failed to create database
1007: database already exists, create a database failure
1008: The database does not exist, delete the database failed
1009: You can not delete the database file cause the deletion of database failure
1010: You can not delete the data directory cause the deletion of database failure
1011: delete the database file failed
1012: can not read record in system table
1020: record has been modified by other users
1021: hard disk free space is insufficient, please increase the available hard disk space
1022: duplicate keywords, change records failed
1023: An error occurred during shutdown
1024: reading file error
1025: An error occurred when the name change
1026: write file error
1032: record does not exist
1036: data table is read-only, it can not be modified
1037: insufficient system memory, restart the database or restart the server
1038: insufficient memory sort, increase the sort buffer
1040: the maximum number of connections to the database has been reached, please increase the number of available connections database
1041: insufficient memory system
hostname invalid: 1042
1043: invalid connection
1044: the current user does not access to a database
1045: can not Connect to the database, user name or password error
1048: Field can not be empty
1049: The database does not exist
1050: data table already exists
1051: data table does not exist
1054: Field does not exist
1065: Invalid SQL statements, SQL statement is empty
1081: You can not establish a connection Socket
1114: data table is full and can not accommodate any recorded
data tables too many open: 1116
1129: Database abnormal, restart the database
1130: failed connect to the database, the database is not connected privilege
1133: the database user does not exist
1141: the current user is not authorized to access the database
1142: the current user is not authorized to access the data tables
1143: the current user is not authorized to access data in the table fields
1146: data table does not exist
1147: undefined user's access to data tables
1149: SQL statement syntax error
1158: network error, read error occurs, check your network connection status
1159: network error, reading timeout, check the network connection status
1160: network error, write error occurs, check the network connection status
1161: network error, write timeout, please check your network connection status
1062: duplicate field values, storage failure
1169: duplicate field values, update records failed
1177: open data table failed
1180: to commit the transaction failed
1181: roll back the transaction failed
1203: when Former user databases and establish connections has reached the maximum number of connections to the database, increase the number of available database connections or restart the database
1205: lock timeout
permissions of the current user does not create users: 1211
1216: foreign key constraint check fails, update the child table record failed
1217: foreign key constraint check fails, delete or modify the primary table record failed
1226: current resource users has exceeded the allowed resources, please restart the database or restart the server
1227: insufficient permissions, you have no right to do this
1235: MySQL version is too low, it does not have this function

The bin Logreader MySQL
mysqlbinlog -v --base64-output = DECODE- ROWS ~ / mysql2 | grep -A4 'ALTER'> ~ / alter2.text

Guess you like

Origin www.cnblogs.com/sunshinea121/p/10980004.html