in Hacking

MySQL database dump without system tables

candidates=$(echo "show databases" | mysql -u root | grep -Ev "^(Database|mysql|performance_schema|sys|information_schema)$")
mysqldump -u root --databases $candidates > full-backup-without-system-tables-$(date +%F).sql
Share
  • Related Content by Tag