Mysql backup

From wikinotes

You'll need the full 'mysql' package rather than just the 'mysql-client' in order to do this:

CREATE USER 'backup'@'ip-address' IDENTIFIED BY 'password';   # create user for backups
GRANT SELECT, LOCK TABLES, SHOW VIEW    ON *.*    TO backup;  # permissions required by mysqldump
mysqldump -p 3306  -h 192.168.20.151 -u backup -ppassword --all-databases > /home/backup/backup.sql