mysql: [Warning] Using a password on the command line interface can be insecure.
MySQL 使用 mysqldump 导出数据库提示:
mysql: [Warning] Using a password on the command line interface can be insecure.
解决办法:
cat > /tmp/myconfig.cnf <<EOF [client] user = "root" password = "123456" EOF docker cp /tmp/myconfig.cnf mysql:/tmp/ # 导出并压缩 docker exec -it mysql mysqldump --defaults-extra-file=/tmp/myconfig.cnf -uroot dbname | gzip > /tmp/dbname.sql.gz # 解压: gzip -d /tmp/dbname.sql.gz
文章目录
关闭
共有 0 条评论