ip addr|grep inet
inet 192.168.8.47/24 brd 192.168.8.255 scope global ec1
inet 192.168.8.45/24 brd 192.168.8.255 scope global secondary ec1:1
I got like this
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Queueing master event to the relay log
Master_Host: 192.168.8.47
Master_User: repl
Master_Port: 3310
Connect_Retry: 60
Master_Log_File: mysql-bin.000126
Read_Master_Log_Pos: 82811044
Relay_Log_File: c60-relay-bin.000002
Relay_Log_Pos: 426371
Relay_Master_Log_File: mysql-bin.000125
the 8.47 ,will be remove on the master machine ,and then I do
on slave
stop slave ;
change master to master_host='192.168.8.45';
start slave ;
and then I got error like
Last_Error: Error 'Field 'xxx' doesn't have a default value' on query.
what the database do ? when change master master_host only?
how to resolve this problem ,and the right way to change master (change master to master_host,user,root..etc)?
on the slave
mysql> select @@sql_mode;
+------------------------------------------------------------------------------------+
| @@sql_mode |
+------------------------------------------------------------------------------------+
| IGNORE_SPACE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
CHANGE MASTER
? Or some subsequentINSERT
? Do you have a column named "xxx"?Last_Errno: 1364
,the column exists! I located the query and execute the query ,just warnig without error,succeed !