就用 --ignore-table=dbname.tablename参数就行,可以忽略多个。

/usr/bin/mysqldump --set-gtid-purged=OFF -h127.0.0. -uroot -p123456 dbname --ignore-table=dbname.tb1
--ignore-table=dbname.tb2 > ./db_files/dsp.sql

Mysql查询某字段值重复的数据

查询user表中,user_name字段值重复的数据及重复次数

select user_name,count(*) as count from user group by user_name having count>1;
05-08 08:34