Tag: MySQL

Mysqldump all databases and gzip

So, quick and simple MySQL backup in a CRON. #!/bin/bash _hour=`date '+%H'`; _user="root"; _pass="thepassword"; _dest="/srv/backups/daily/"; mysqldump -u $_user -p$_pass --all-databases --ignore-table=mysql.event | gzip > $_dest_$_hour.sql.gz I’ve used this in an…

MySQL Profiling

MySQL allows you to profile queries, enabling you to see whats being run on your server. They are stored in a special profile table in the INFORMATION_SCHEMA database. You can…