423,834 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,834 IT Pros & Developers. It's quick & easy.

mysqldump: Got error: 1045:

ram09
P: 45
im trying to dump my database for a replication but i encounter this error message...
mysqldump: Got error: 1045: access denied for user 'ODBC' @ 'localhost' <using password NO> when trying to connect....
can somebody tell me how can i solve this problem please..
Oct 28 '08 #1
Share this Question
Share on Google+
2 Replies


Atli
Expert 5K+
P: 5,058
Hi.

The error message pretty much says it all. The user you are using to connect is being denied access.
Based on the username it is showing, I am guessing you are using the Windows Command Prompt and that you left out the -u and -p parameters in the mysqldump command.

The command should look something like:
Expand|Select|Wrap|Line Numbers
  1. mysqldump -u userName -p --databases test > dumpfile.sql
  2.  
Where "userName" is the name of the user you use to connect.

When you do this, you will be prompted for you password.
If you would rather *inline* your password into the command (which I recommend against unless you have a good reason for it), then you simply enter it after the -p parameter.
Like:
Expand|Select|Wrap|Line Numbers
  1. mysqldump -u userName -pmyPass --databases test > dumpfile.sql
  2.  
Where "myPass" is the password. (Note the lack of a space between -p and the password. If you add a space this will not work!)
Oct 28 '08 #2

ram09
P: 45
Hi.

The error message pretty much says it all. The user you are using to connect is being denied access.
Based on the username it is showing, I am guessing you are using the Windows Command Prompt and that you left out the -u and -p parameters in the mysqldump command.

The command should look something like:
Expand|Select|Wrap|Line Numbers
  1. mysqldump -u userName -p --databases test > dumpfile.sql
  2.  
Where "userName" is the name of the user you use to connect.

When you do this, you will be prompted for you password.
If you would rather *inline* your password into the command (which I recommend against unless you have a good reason for it), then you simply enter it after the -p parameter.
Like:
Expand|Select|Wrap|Line Numbers
  1. mysqldump -u userName -pmyPass --databases test > dumpfile.sql
  2.  
Where "myPass" is the password. (Note the lack of a space between -p and the password. If you add a space this will not work!)
thank you very much sir, it helped me a lot...^^
Oct 29 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.