简体   繁体   English

导入MySQL XML Dump?

[英]Import MySQL XML Dump?

I have dumped a MySQL database (all tables) for use with PHPUnit using this command: 我已经使用以下命令转储了MySQL数据库(所有表)以用于PHPUnit

mysqldump --xml -t -u [username] --password=[password] [database] > /path/to/file.xml

I need to modify the test data, so I need to re-import it back into the database so I can work on it with MySQL workbench. 我需要修改测试数据,因此需要将其重新导入数据库,以便可以在MySQL工作台上进行处理。

What is the command to reimport it back into a specified database? 将其重新导入到指定数据库的命令是什么?

And no, it's not as simple as LOAD XML , that works on a table by table basis, but this export has all tables in it. 不,它不像LOAD XML那样简单,它可以逐表工作,但是此导出中包含所有表。

NO , there is no built in way present to restore a XML formatted dump file. ,目前没有内置的方法来还原XML格式的转储文件。 You can check this blog Restoring XML-formatted MySQL dumps for information on this as well as this existing post How to restore a mysql xml database file from mysql command line? 您可以查看此博客恢复XML格式的MySQL转储以获取有关此信息以及此现有文章的信息。 如何从mysql命令行恢复mysql xml数据库文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM