Connecting Tech Pros Worldwide Forums | Help | Site Map

mysqldump: Got error: 1045:

ram09's Avatar
Member
 
Join Date: Oct 2008
Posts: 45
#1: Oct 28 '08
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..

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,752
#2: Oct 28 '08

re: mysqldump: Got error: 1045:


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!)
ram09's Avatar
Member
 
Join Date: Oct 2008
Posts: 45
#3: Oct 29 '08

re: mysqldump: Got error: 1045:


Quote:

Originally Posted by Atli

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...^^
Reply