Help Center> Data Replication Service> Troubleshooting> Solutions to Failed Check Items> Database Parameters> Checking Whether the sql_mode Values of the Source and Destination Databases Are the Same
Updated on 2024-05-09 GMT+08:00

Checking Whether the sql_mode Values of the Source and Destination Databases Are the Same

Check whether the sql_mode values of the source and destination databases are the same. If they are different, the migration may fail. You are advised to change them to the same value.

Failure Cause

The sql_mode values of the source and destination databases must be the same.

Handling Suggestion

Change the value of sql_mode of the source database to be the same as that of the destination database.
  • If the database is a self-managed MySQL database, run commands to change the value.
    SET sql_mode ='New value';
  • If the database is an RDS for MySQL DB instance, change the value of the sql_mode parameter by referring to Modifying Parameters of an RDS for MySQL Instance.

If MyISAM tables are to be migrated, the sql_mode values in the destination database cannot contain no_engine_substitution.

For details about how to change the value of sql_mode for other types of databases, see the usage guide of the corresponding database.