Today's changes to JBoss error are as follows:
' HY000 ' ' 1592 ' inch which rows is retrieved determines what (if any) rows would be written. This order cannot is predicted and may differ on master and the slave.]
Tip: Warning, it is unsafe to select a table from another table with an AutoIncrement column, because the order in which rows are retrieved determines which rows, if any, will be written. This command is unpredictable and will make the master-slave data inconsistent.
The Binglog format for modifying the main library and from the library is changed from statement to row format.
Method:
1, first modify from the library
Mysql> Show global variables like"binlog%";+-----------------------------------------+--------------+| variable_name | Value |+-----------------------------------------+--------------+| Binlog_cache_size |32768|| Binlog_checksum | CRC32 | | Binlog_direct_non_transactional_updates | OFF | | binlog_error_action | Ignore_error | | Binlog_format | MIXED | | Binlog_gtid_simple_recovery | OFF | | Binlog_max_flush_queue_time |0|| Binlog_order_commits | On | | Binlog_row_image | Full | | binlog_rows_query_log_events | OFF | | Binlog_stmt_cache_size |32768|| Binlogging_impossible_mode | Ignore_error |+-----------------------------------------+--------------+ ARowsinchSet (0.00Sec
Mysql> set global binlog_format=0 rows affected (0.00 sec) MySQL" Binlog_format"; +---------------+-------+| variable_name | Value |+---------------+-------+| Binlog_format | ROW |+---------------+-------+1 in Set (0.00 sec)
2, in the modification of the main library
Mysql> set global binlog_format=0 rows affected (0.00 sec) MySQL" Binlog_format"; +---------------+-------+| variable_name | Value |+---------------+-------+| Binlog_format | ROW |+---------------+-------+1 in Set (0.00 sec)
3. Modify the configuration file my.cnf
Binlog_format=row
If you modify the main library first, you may get the following error.
1666 'cannot execute statement:impossible to write to binary log since statement are in row Format and Binlog_format = STATEMENT. '
Welcome reprint, please indicate the source!
MySQL Online change binlog format