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




Save and exit the my.cnf file

Now write the following script to the CRON job

#! /bin/sh

mysqldump –u root –all-databases –routines


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