当我尝试将现有数据库导入本地主机时,出现了这个错误。该数据库可以导入到Web主机服务器中,但无法导入到本地主机。
错误信息如下:
静态分析:
分析过程中发现2个错误。
Ending quote ' was expected. (near "" at position 28310)
4 values were expected, but found 3. (near "(" at position 28266)
当我尝试将现有数据库导入本地主机时,出现了这个错误。该数据库可以导入到Web主机服务器中,但无法导入到本地主机。
错误信息如下:
静态分析:
分析过程中发现2个错误。
Ending quote ' was expected. (near "" at position 28310)
4 values were expected, but found 3. (near "(" at position 28266)
PhpMyAdmin有点傻,因为它不能导入它自己导出的内容。它将单引号转义为''
而不是\'
,然后无法处理像这样的字符串:
''I can''t do this anymore!''
''
→ \'
, orimport via mysql.exe
:
mysql -uuser -ppass dbName < file.sql
client's
)的WordPress评论被转义为\'
,这破坏了导入到本地phpMyAdmin数据库的语法。简而言之,将\'
替换为\"
。 - jaegs