Forum Moderators: open

Message Too Old, No Replies

mysqldump: Got error: 1045: Access denied for user

         

Discovery

11:49 am on Jul 6, 2007 (gmt 0)

10+ Year Member



Problem : When I try to take Database backup using mysqldump from SSH its gives following error:

examplified @ example.com[~]# mysqldump --port 3306 -u save_User --password=save_Pass -h example.com --databases examplified_DB --add-drop-table > dbdump.sql
mysqldump: Got error: 1045: Access denied for user 'save_User'@'examplified.example.com' (using password: YES) when trying to connect

and with same user name password i able to connect and use Database.


examplified @ example.com[~]# mysql -u save_User --password=save_Pass
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1997679 to server version: 4.1.21-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use examplified_DB ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

So please Help
Thanks

[edited by: tedster at 7:27 pm (utc) on July 7, 2007]
[edit reason] use example.com - it can never be owned [/edit]

The Contractor

11:58 am on Jul 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure the db user has admin privileges and also make sure that you are not on FreeBSD as the last time I worked with it, it did not have mysqldump support. There are some free PHP scripts out there though which work fine if that’s the case.

Discovery

5:38 am on Jul 7, 2007 (gmt 0)

10+ Year Member



hey I got the sol,
error:

examplified @ example.com[~]# mysqldump --port 3306 -u save_User --password=save_Pass -h example.com --databases examplified_DB --add-drop-table > dbdump.sql
mysqldump: Got error: 1045: Access denied for user 'save_User'@'examplified.example.com' (using password: YES) when trying to connect

sol :)


examplified @ example.com[~]# mysqldump --port 3306 -u save_User --password=save_Pass -h 127.0.0.1 --databases examplified_DB --add-drop-table > dbdump.sql
mysqldump: Got error: 1045: Access denied for user 'save_User'@'examplified.example.com' (using password: YES) when trying to connect

Just I changed the bold things and its working, I think only local host is allowed to connect to database.

:)

[edited by: tedster at 7:28 pm (utc) on July 7, 2007]
[edit reason] use example.com - it can never be owned [/edit]