script/command for taking automatic backup of mysql database
Ankush Grover
ankush174 at gmail.com
Tue Aug 2 09:28:16 UTC 2005
hey friends,
I am using FC3 with mysql 4.1(downloaded from mysql.com site).
I want a script which automatically takes backup of the mysql
database.I have one database "dental" and I want to setup a cron job
for the database backup .
The command given in the script is :
mysqldump -u root -p *F298CEE6BE03DAEB0D515166F40879C6DD1D24F3
dental > /var/database/dental.sql
If I try to execute the script from the command line it asks for the
password where as the password is given in the command in my case the
password for root user is *F298CEE6BE03DAEB0D515166F40879C6DD1D24F3"
.
How can I avoid asking for password .Moreover I can't keep the
password without encryption in the script.
Is there anyway the script does not asks for the password and the
password if given as argument or passed in the script is encrypted ?
Encryption is done with the mysql "select password('ankush') ' command.
Thanks & Regards
Ankush Grover
More information about the fedora-list
mailing list