I had to make change to my directory path in a lot of posts. I decided to exp开发者_如何学JAVAort the DB and do a find/replace to makew the changes. But when I imported the DB back i got the error
1064 - You have an error in your SQL syntax;
which I think it becuase of mt charset not understanding them ampersand & amp;
How can I import this
It might help if you first change the file from utf-8 to iso-8859-1 with a command line program.
Start a command line session and change directory so you are in the directory that this file is in and enter the command
iconv -cs -f UTF-8 -t ISO-8859-1 utf8.txt > iso.txt
If you do not have access to a linux command line use google to find a windows method to convert between utf8 and iso character sets.
You've not given much information in the question but I'd recommend the following approach:
- Restore from your last backup
- Have a look at MySQL's REPLACE() function. It should be able to do your find/replace work all in the database
精彩评论