开发者

MySQL will connect on the command line with u/p but not mysqldump

开发者 https://www.devze.com 2022-12-22 04:48 出处:网络
It\'s driving me mad! I can connect to my server\'s MySQL via Terminal using: mysql -u admin -p and then password fine.

It's driving me mad!

I can connect to my server's MySQL via Terminal using:

mysql -u admin -p and then password fine.

Trying the same with:

mysqldump --user admin --password=mypassword test12开发者_StackOverflow中文版3 > /backups/test.sql

just gets me mysqldump: Got error: 1045: Access denied for user

Any words of wisdom for me, do I need to grant more priviledges to admin?

Thanks,

Chris


Your mysqldump commandline is wrong. use

--user=admin

or

-u admin


As i see, you do the wrong command, because is: mysqldump --user=admin --password=mypassword test123 > /backups/test.sql i suggest to add --opt and -h serverip just to be sure.

0

精彩评论

暂无评论...
验证码 换一张
取 消