2013-03-08 67 views
0

我使用phpmyadmin(版本3.3.8)导出我与托管服务提供商(因此我做备份的唯一方法)的网站的数据库。当我这样做出口,我有以下选项设置:phpmyadmin数据库导出是二进制

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. 

生成的文件看起来是二进制(而不是SQL如我所料)。我尝试导入二进制文件,但当然失败了。我如何解决这个问题,以便导出的文件在导入时起作用?我从来没有与任何其他网站的这个问题。

谢谢。

+1

是否在发送文件之前对文件进行gzipping或bzipping,或许? – Crontab 2013-03-08 18:16:10

+0

我已经设置了gzip文件。我只是试着将它备份,没有压缩,看起来应该如此。为什么要这样做会导致这种情况发生?在gzip文件之前,我从来没有遇到过这个问题。 – user5013 2013-03-08 18:25:13

+0

,因为压缩数据是压缩数据。在你解压缩之前,它不是**可读的。你基本上抱怨你的汽车在涂成蓝色后会变蓝。 – 2013-03-08 18:28:37

回答

0

我没有选择压缩导出的文件,发现我的问题的解决方案。出于某些原因,在这种特殊情况下,选择压缩输出会导致导出损坏。为什么这是,我不知道,因为我迄今为止成功地使用了这个选项(可能主机提供商有一些奇怪的设置)。如果您遇到同样的问题,请尝试使用不压缩,并查看它是否为您解决。