导出表数据 ===========》   mysql -hmysql机器 -u用户名 -p密码 -P端口号 -Ne "use 数据库名; select * from  \`comment-filter\`; " > /tmp/comment_filter.sql

当表名不符合规范时,直接写comment-filter会报错,加上\`comment-filter\`就OK

导出表结构和数据

mysqldump -hmysql机器 -u用户名 -p密码 -P端口号 数据库名 --skip-lock-tables > /tmp/aa.sql 

 加   --skip-lock-tables  参数主要是因为出现报错信息 Access denied for user '用户名'@'ip' to database '数据库名' when using LOCK TABLES

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-01-13
  • 2021-06-04
  • 2021-10-19
猜你喜欢
  • 2021-06-12
  • 2021-09-26
  • 2021-10-30
  • 2021-12-30
  • 2021-10-08
相关资源
相似解决方案