mysql sql_mode

设置 sql_mode

set global sql_mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";

查看 sql_mode

show variables like 'sql_mode';

OR

SELECT @@sql_mode

mysqldump ignore table

mysqldump 忽略一些表

--ignore-table=name   Do not dump the specified table. To specify more than one
                      table to ignore, use the directive multiple times, once
                      for each table.  Each table must be specified with both
                      database and table names, e.g.,
                     --ignore-table=database.table

例子

mysqldump -u dw -p dw --ignore-table=dw.raw_tracking --ignore-table=dw.raw_access > dump_without_tracking_access.sql