MySQL database dumps can be automated via a CRON job, without providing a password, to achieve the same follow these steps

Edit you my.cnf and make the following entries

[mysqldump]

User=root

Password=secret

Save and exit the my.cnf file

Now write the following script to the CRON job

#! /bin/sh

mysqldump –u root –all-databases –routines

>/var/lib/mysqldump/mysql.dump

Automating the database dumps without using the password will make the maintenance easier.

-Death

Advertisements