mysqldump access denied

后端 未结 9 2111
闹比i
闹比i 2020-12-14 15:23

When I try to backup using mysqldump from ssh, I run the following command on machine 10.64.1.1. It gives the following error.

mysqldump --user=test -p=passwor

相关标签:
9条回答
  • 2020-12-14 15:53

    I had the same problem with a DB user created via Plesk. The user has permissions for a single database. If I specify the database name I get the error mentioned above. If I specify -A for all databases, the dump works.

    0 讨论(0)
  • 2020-12-14 15:56

    You have to run CMD.EXE as the Administrator:

    Right click on cmd.exe --> Run as Administrator and then type your command:

    mysqldump -u[username] -p[password] -h[ip or name] yourdatabasename > c:\sqlfile.sql

    It should work fine.

    0 讨论(0)
  • 2020-12-14 15:57

    I think that you would have to lose the = when using -p or do it with --password :

    --password[=password], -p[password]

    The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one. Specifying a password on the command line should be considered insecure. See Section 6.6, "Keeping Your Password Secure".

    0 讨论(0)
  • 2020-12-14 15:59

    Trying with this command

    mysqldump --user=root -p --host=127.0.0.1 --databases database_name [database_name_2,...] > dump.sql
    
    0 讨论(0)
  • 2020-12-14 16:02

    There is no = (equal sign) for the connection options. You want the following.

    mysqldump -u test -ppassword -h 10.64.1.2 ...
    

    Check out the docs for more details on the other options.

    0 讨论(0)
  • 2020-12-14 16:02

    Heres what worked for me- run cmd line as admin. dont put any password after -p, you are automatically prompted to enter a password and it works.

    0 讨论(0)
提交回复
热议问题