我有一个 mysql 文件,它似乎在数据库中存储的某些 HTML/JS 中被破坏。
这里有一些错误:
[ERROR in query 178] 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 '
和
[ERROR in query 179] 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 '}
// ]]> </script> <script src="./js/tooltip.js" type=' at line 1 [ERROR in query 180]
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 '} /* ]]> */
和
[ERROR in query 181] 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 'Table './web_cms_prod/wp_redirection_logs' is marked as crashed and should be re' at line 1
如果重要的话,它是一个 wordpress 数据库,不确定为什么有人将 HTML 存储在数据库中,但我仍然需要将其导入。
有什么想法吗?我能以某种方式逃避它吗?一个 SED unix 命令会很好,因为它是一个 9 兆的文件。
最佳答案
可能不是 //
而是它前面出现的一些引号。您需要确保字符串值中包含的所有引号都已转义。
关于wordpress - 由于 `//`,MYSQL 导入失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6619179/