MikeonTV
Member
Posted 1 year ago #
I had to make change to my directory path in a lot of posts. I decided to export 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 &
How can I import this
s_ha_dum (was apljdi)
Member
Posted 1 year ago #
You won't be able to import until you find the syntax error.
I think what I would do is copy the table-- make sure you presevere everything including auto-increment values-- to another table in the database and then use MySQL's replace to make the changes. If, as you suspect, the issue is with the charset you should get around the problem that way. After you've made the changes and your modified table is sane, you can rename the two tables and everything should work.
MikeonTV
Member
Posted 1 year ago #
I already dropped the tables and can't import the backup
s_ha_dum (was apljdi)
Member
Posted 1 year ago #
Oh...
As soon as you started editing the backup it stopped being a backup.
Take the file you have and copy it. The copy is now a quasi-backup. At least you can back up somewhat. Then cut about half the file into another file and try to import that. Be sure to break the cut between queries. If that doesn't work cut your file halves in half so that you have quarters of the original. And so on. The idea is to import piecemeal and also to narrow down where the errors are in the file so that hopefully you can correct them.