I recently exported a db out of MySQL 5.0.92 and tried to import into MySQL 5.0.95.
This is error message I rec’d.
#1064 - 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 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w' at line 1
Any ideas on what the issue is or a fix? I’ve searched and seen any number of possible errors.
Thanks in advance
Looks like you are trying to import a non-SQL file (maybe a .html or XML file?).
I had this exact same issue and of course I Googled it like you have, only to have someone tell us that we must not be importing a SQL file and that we may have mistakenly used an HTML or XML file. I have moved about 50 wordpress sites and I was pretty sure that I knew the difference between an HTML extension and a SQL. Although that error was exactly what i have seen in my PHP development days, so perhaps the client did a post with some of that HTML syntax that was displaying? Nope ruled that out because the posts table imported/exported perfectly. Moving along, it would import around half of the db (38 of 72 tables) before giving the error. The export out of phpmyadmin was done twice and import into the new phpmyadmin was also done twice; both times breaking at the same place (redirection_log from the redirection plugin) Luckily for me, i was porting FROM a godaddy server and there was another db backup option. within the hosting control panel you can create a sql backup to the host. i downloaded it and tried to import a third time and had success. It must’ve been the export from phpmyadmin that was the problem. My advice is try a different method of export if possible OR you might need to break up your exports to smaller pieces (YUCK). My db was particularly large (13.9mb).
- The topic ‘db import issue’ is closed to new replies.