mysqldump: Got error: 1045:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ram09
    New Member
    • Oct 2008
    • 45

    mysqldump: Got error: 1045:

    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
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    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:
    Code:
    mysqldump -u userName -p --databases test > dumpfile.sql
    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:
    Code:
    mysqldump -u userName -pmyPass --databases test > dumpfile.sql
    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!)

    Comment

    • ram09
      New Member
      • Oct 2008
      • 45

      #3
      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:
      Code:
      mysqldump -u userName -p --databases test > dumpfile.sql
      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:
      Code:
      mysqldump -u userName -pmyPass --databases test > dumpfile.sql
      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...^^

      Comment

      Working...