mysqldump Error 1045 Access denied despite correct passwords etc

后端 未结 28 1791
执笔经年
执笔经年 2021-01-30 12:56

This is a tricky one, I have the following output:

mysqldump: Got error: 1045: Access denied for user \'root\'@\'localhost\' (using password: YES) when tr

28条回答
  •  你的背包
    2021-01-30 13:04

    mysqldump -u (user) -p(passwd) -h (host_or_IP) database_to_backup > backup_file.sql

    example:

    mysqldump -u god -pheaven -h 10.0.10.10 accounting > accounting_20141209.sql

    this would create sql backup file for the accounting database on server 10.0.10.10. Sometimes your error is seen when localhost is not in config. Designating ip of server may help.

提交回复
热议问题