SQL数据脚本导入时总是出错(确认脚本语法没错误)“

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DROP TABLE IF EXISTS `pw_members`;
CREATE TABLE `pw_members` (
  `uid` int(10' at line 1”

错误提示是在第一行有错误。


问题所在:

注意编辑工具右下角提示“有签名”,有签名的文件有可能是用Windows系统的txt创建的文本,而这种Win创建出的文本在文件头上加入了BOM头(十六进制下可以看到),所以导致软件读取信息出错。

wKioL1ehZ16iwD9qAAAPurNi-qo522.jpg-wh_50

解决方法:

用EmEditor或Notaped这类文本工具打开后,另存为一份即可。注意保存选择“无签名”。

UTF-8编码根据你实际去选择。

wKiom1ehaH-B0K7vAAAX8PUdewg995.jpg-wh_50