我从phpmyadmin导出了一个mysql数据库到sql.gz文件,我想重新导入它,但是在尝试重新导入时遇到了sql错误,
-- Dumping data for table `mg_address_format`
--
INSERT INTO `mg_address_format` (`id_country`, `format`) VALUES
(1, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode
city\nCountry:name\nphone\nphone_mobile'),
(2, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode
city\nCountry:name\nphone\nphone_mobile'),
(3, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode
city\nCountry:name\nphone\nphone_mobile'),
(4, 'firstname lastname\ncompany\naddress1\naddress2\ncity State:name
postcode\nCountry:name\nphone\nphone_mobile'),
(5, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'?' at line 101
是否有任何解压缩文件的解决方案(我在Windows上)? 编辑 当我试图解压缩它时
gunzip -d megadealo2.sql.gz
我得到了
gzip: megadealo2.sql.gz: not in gzip format
感谢。
答案 0 :(得分:0)
.sql.gz表示压缩导出;你不应该将其扩展名更改为.sql,而是使用gunzip解压缩它。或者,在导出时,不要求压缩输出。