从正在运行的Docker备份mysql数据库

时间:2020-01-21 03:02:25

标签: mysql docker

我尝试在下面运行sqldumpl的命令并备份mysql

sudo docker exec core_db_1 /usr/bin/mysqldump -u root -password=root mydb > backup.sql 

我收到结果错误

mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

所以我不怎么解决。

0 个答案:

没有答案