简体   繁体   English

phpmyadmin数据库导出为二进制

[英]phpmyadmin database export is in binary

I am using phpmyadmin (ver. 3.3.8) to export a database of a website that I have with a hosting provider (hence my only method of doing a backup). 我正在使用phpmyadmin(3.3.8版)导出与托管服务提供商一起拥有的网站的数据库(因此,这是我做备份的唯一方法)。 When I do the export, I have the following options set: 导出时,设置了以下选项:

Export: SQL

Within the OPTIONS group; under the STRUCTURE sub group,
Selected the check box next to "Structure"
Selected the check box labeled "Add AUTO_INCREMENT value"
Selected the check box labeled "Enclose table and field names with backquotes"

Within the OPTIONS group, under the DATA sub group:
Selected the check box marked "Complete inserts".
Selected the check box marked "Extended inserts".
Selected the check box labeled "Use hexadecimal for binary fields" may be selected
Selected "INSERT" in the combo box labeled "Export type:"

Selected to gzip the exported file.

The resulting file looks like it is in binary (and not SQL as I expected). 生成的文件看起来像是二进制文件(而不是我期望的SQL)。 I tried importing the binary file but of course that fails. 我尝试导入二进制文件,但是当然失败了。 How do I fix this so that the exported file works on import? 如何解决此问题,以便导出的文件在导入时起作用? I never had this problem with any other site. 我从未在任何其他网站上遇到此问题。

Thanks. 谢谢。

I found the solution to my problem by not selecting to to compress the exported file. 通过不选择压缩导出的文件,我找到了解决问题的方法。 For some reason in this particular situation, selecting to compress the output causes the export to become corrupt. 在这种特定情况下,由于某种原因,选择压缩输出会导致导出损坏。 Why this is, I have no idea, as I have used this option successfully before until now (perhaps the hosting provider has some sort of weird set up). 我不知道为什么会这样,因为到目前为止我已经成功使用了此选项(也许托管服务提供商设置了某种奇怪的设置)。 If you are experiencing the same issue then try using no compression, and see if it solves it for you. 如果您遇到相同的问题,请尝试不使用压缩,然后看看它是否可以解决您的问题。

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

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