How to restore a mysql xml database file from mysql command line?

亡梦爱人 提交于 2019-12-12 09:45:27

问题


I am running Windows XP, using the MySQL shell and PowerShell (MySQL 5.5), using XAMPP for Windows.

I have an XML file which I've placed in E:\xampp\mysql\bin for convenience. I can run .\mysqldump.exe and .\mysql.exe but don't seem to be able to find the correct syntax for the type of XML file I'm using.

The XML file is laid out like this:

<mysqldump>
<database name="export">
<table_structure name="export_rental_2006_property">
<field Field="id" Type="bigint(20)" Null="NO" Key="" Default="" Extra=""/>
<field Field="name" Type="varchar(255)" Null="NO" Key="" Default="" Extra=""/>

...and so on, with "table_data" tags, "row" tags, and "field" tags with name= attributes etc.

Just to let you know, I have no way of changing the export format - this is what I have to import. I've looked around and nothing I've tried from various tutorials and the MySQL website seemed to have worked. Maybe I'm getting the procedure wrong.

If anybody has experience with this, help would be very appreciated.

Thanks

来源:https://stackoverflow.com/questions/9313992/how-to-restore-a-mysql-xml-database-file-from-mysql-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!