MYSQL Import Failing because of `//`

I have a mysql file that seems to be breaking at some HTML/JS that is stored in the database.

Here are a few errors:

Read More

[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 ‘

and

[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 ‘}
/* ]]> */

and

[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

Its a wordpress database if that matters, not sure why someone is storing HTML in the database, but I need to get it imported nonetheless.

Any ideas? Can I escape it somehow? A SED unix command would be nice as its a 9 meg file.

Related posts

Leave a Reply

1 comment

  1. It’s probably not the // but some quotes that appear before it. You need to make sure that all of the quotes contained within your string values are escaped.