我一直在尝试从托管的 phpMyAdmin 界面导出数据库并将其在本地导入 phpMyAdmin 或使用 SequelPro。这从来都不是问题。但是最近当我在本地 phpAdmin GUI 中导入数据库时,我得到了一个错误:
[ERROR in query 36] 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 22
我应该运行什么查询或者我应该如何检查query 36
或line 22
. 我怀疑可能某个条目已损坏,从而导致错误。
相反,如果我尝试将数据库导入 SequelPro,则会收到此类错误:
File read error
An error occurred when reading the file, as it could not be read in the encoding you selected (Autodetect - Unicode (UTF-8)).
Only 0 queries were executed.
跟进此错误,我尝试将 Encoding 设置为Western (Mac OS Roman)
. 但我仍然得到同样的错误。
诚然,数据库主要以 UTF-8 编码。但是有一些表被编码为 cp1252 / latin1_swedish_ci。总是如此,从未出现任何出口/进口问题。
此外,另一个可能的问题是大多数表类型都是 MyISAM。然而,少数是 InnoDB,这是有原因的。但是话又说回来,这从来没有给我们带来问题。
非常感谢任何线索或建议。