[Ilugc] Mysql database backup

  • From: vijayakumarnkdr@xxxxxxxxx (Vijay Kumar)
  • Date: Thu, 7 Jul 2011 18:51:10 +0530

Dear all,

I want to take backup mysql database through cron, I have executed this
command

/usr/bin/mysqldump -u root -p(xxxxx) king | gzip > /backups/king_`date
+%y_%m_%d`.gz

It shows this error -

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using
password: YES) when trying to connect

But I have executed the above command with out any password it done
successfully, the command like this -

/usr/bin/mysqldump -u root -p king | gzip > /backups/king_`date
+%y_%m_%d`.gz

It asks the password and it executed successfully.


 Any one help me. Thanks in advance.


-- 

With regards,

G. Vijayakumar,
+91 8973417398

Other related posts: