无来

不管你来还是不来
我都在这里,夜夜点亮
不是为了守候
只是为了做好我自己

0%

mysqldump –ignore-databases

With mysqldump it is not possible by the parameters to exclude individual databases. However, the database can be easily queried from the information_schema and this makes an exclude.

1
2
3
4
5
6
mysqldump --databases
`mysql --skip-column-names
-e "SELECT GROUP_CONCAT(schema_name SEPARATOR ' ')
FROM information_schema.schemata
WHERE schema_name NOT IN ('mysql','performance_schema','information_schema','db_test');"`
>/dump.sql