有没有办法隐藏或导出整个MySQL数据库到有效的CSV文件? [英] Is there a way to covert or export an entire MySQL database to valid CSV files?

查看:163
本文介绍了有没有办法隐藏或导出整个MySQL数据库到有效的CSV文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个大型数据库1.5千兆和大量的表/字段。我需要将所有表转换为CSV文件。 PhpMyAdmin不容易/超时。

I am working with a large database 1.5 gig in size and hundreds of tables / fields. I need to convert all tables into CSV files. PhpMyAdmin does not do this easily / times out.

我宁愿使用shell / mysql命令或脚本将数据导出到CSV中。

I would rather use a shell / mysql command or a script to get the data out and into CSV.

注意:

我想要导出数据库的所有表 - 在一个镜头。

I am looking to export ALL tables of the database - in 1 shot. I can not produce an export command for every single table individually.

推荐答案

您可以使用 mysqldump

You can use mysqldump:


mysqldump 命令还可以生成CSV,分隔文本或XML格式。

The mysqldump command can also generate output in CSV, other delimited text, or XML format.

特别要注意以下参数:

  • --tab=path
  • --fields-[optionally-]enclosed-by
  • --fields-escaped-by
  • --fields-terminated-by
  • --lines-terminated-by
  • --no-create-info

这篇关于有没有办法隐藏或导出整个MySQL数据库到有效的CSV文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆