ip addr|grep inet    
inet brd scope global ec1
inet brd 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_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='';    
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                                                                         |
1 row in set (0.00 sec)
  • What got that error? The CHANGE MASTER? Or some subsequent INSERT? Do you have a column named "xxx"? – Rick James Jun 11 '19 at 15:59
  • TKS for reply, got the error : Last_Errno: 1364 ,the column exists! I located the query and execute the query ,just warnig without error,succeed ! – ping chem Jun 12 '19 at 1:43

try with SET SQL_MODE = ''; or add this STRICT_TRANS_TABLES with existing data modes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.