tags:

views:

21

answers:

3

Hi,

I need to backup all MySQL databases available to a partiular user and store them *databasename_date.sql*

Is there any way to use mysqldump to dump all databases instead of telling it each database name it needs to backup?

Thanks

A: 

You can try --all-databases switch

a1ex07
+2  A: 

You can try for linux

date=date -I; mysqldump -u yourusername -p yourpassword --all-databases > /home/LOGIN/backups/xbackup_$date.sql; gzip /home/LOGIN/backups/xbackup_$date.sql

More detailed explaination is given at

http://www.skyminds.net/2004/05/29/backup-all-your-mysql-databases-with-one-line-of-cron/

Yogesh