mysqldump Error 1045 Access denied despite correct passwords etc

后端 未结 28 1237
执笔经年
执笔经年 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:01

    If you're able to connect to the database using mysql, but you get an error for mysqldump, then the problem may be that you lack privileges to lock the table.

    Try the --single-transaction option in that case.

    mysqldump -h database.example.com -u mydbuser -p mydatabase --single-transaction  > /home/mylinuxuser/mydatabase.sql
    

提交回复
热议问题