How to create a mysqldump client based on docker to export the contents of a specific database

旧城冷巷雨未停 提交于 2021-02-10 16:43:45

How to create a mysqldump client based on docker to export the contents of a specific database

  • Dumping the database structure for all table with no data
docker run -it --rm \
  mysql:5.7.28 \
  mysqldump \
  --host=192.168.1.131 \
  --port=3306 \
  --no-data \
  --databases nacos \
  --user=root \
  --password=Gah6kuP7ohfio4 > nacos.sql
  • Dumping the database structure for all table with with data
docker run -it --rm \
  mysql:5.7.28 \
  mysqldump \
  --host=192.168.1.131 \
  --port=3306 \
  --databases nacos \
  --user=root \
  --password=Gah6kuP7ohfio4 > nacos.sql
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!