MySQL Forums
Forum List  »  Newbie

mysqldump password issue
Posted by: befortin
Date: July 30, 2005 02:21PM

I have to backup a database. It doesn't work :
=============================
# mysqldump --user root --password="My-Password" zabbix > /tmp/dump.test
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
=============================

BUT I can use mysqldump this way :
=============================
# mysqldump --user root -p zabbix /tmp/dump.test
// I enter My-Password here, as mysqldump asks me for the password

So mysqldump works, but I have to enter the password manually. The problem is that I want to put this command in a script!

I have already tried the following commands :

mysqldump --user root --password=my-password zabbix > /tmp/dump.test
mysqldump --user root --password='my-password' zabbix > /tmp/dump.test
mysqldump --user root --password="my-password" zabbix > /tmp/dump.test
mysqldump --user root -pmypassword zabbix > /tmp/dump.test

- I get the same error with each of these commands...

Anything else I should try? What I'm I doing wrong??

Options: ReplyQuote


Subject
Written By
Posted
mysqldump password issue
July 30, 2005 02:21PM
August 01, 2005 06:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.