how to fix SQL syntax error during db backup restore
-
In trying to fix the problem with unwanted characters like  showing up in my posts, I tried many fixes, including one too many. I used the Search and Replace plugin, which isn’t tested for this 3.1.3 (bad-bad me), without really having any idea what I was doing. The stray characters disappeared. But a large number of internal links in my blogacquired year/month/day inserts in their permalinks that, of course, screwed things right up. (In other words, permalinks that used to be savoringky.com/wordpress/116sungold turned into savoringky.com/wordpress/2010/07/03/116sungold)
I had backed up my db and files.
I have tried to restore to the backed up db, reasoning that I’d rather have stray characters than broken links. I have no db knowledge at all. I have tried to follow these instructions in the Codex for restoring a db from backup, but I have a radically different version of phpMyAdmin (3.3.8.1 instead of 2.8.0.2) on linux.
Tried it anyway. I got an error message, below, AND I have the stray characters back. Best of both worlds.
I need help addressing the SQL error, I think as the starting point, since I have hope that if I can fully restore the backed up db, at my internal link problem will be corrected.
Advice, please?
‘
Error
SQL query:#
# Data contents of tablewp_redirection_logs
#
INSERT INTOwp_redirection_logs
VALUES ( 1, ‘2011-02-16 12:49:03’, ‘/wordpress/2010/08/07/116summersquash/’, ”, ‘facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)’, ”, , ‘66.220.149.249’, 3, ) ;MySQL said:
#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 ‘ ‘66.220.149.249’, 3, )’ at line 5
‘
The topic ‘how to fix SQL syntax error during db backup restore’ is closed to new replies.