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=password --host=10.64.1.2 --tab=. databasename tablename
mysqldump: Got error: 1045: Access denied for user 'test'@'10.64.1.1' (using password: YES)
when trying to connect
However, I can access mysql using the same user and password.
mysql --user=test -p[password]
Current user: [email protected]
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.91-50-log Percona SQL Server, Revision 73 (GPL)
Protocol version: 10
Connection: 10.64.1.2 via TCP/IP
Updates:
If I do following mysql document: --password[=password]
or -p[password]
.
Since my password contains special symbol @
, Mysql cannot detect user correctly. It complains:
mysqldump: Got error: 1044: Access denied for user 'test'@'%' to database
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…