Mysql db restore problem

I just moved from, and backed up my db to an sql file on my computer.

I am trying to restore this db to dreamhost. I have created the database with the same name, but when I try to import the data, I get the following message:

[smoothie]$ ERROR 1064 (42000) at line 1: 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 'ן»�

It happens with both ssh and web interface. Any help?

I would guess that your old database wasn’t in UTF format for the foreign characters. A Google search led me to this, but I don’t know if it’ll help:
Google Search


Is there a way to convert to UTF?

One of the results on that Google search was called Converting MySQL Database to UTF-8.


In the end it didn’t help me, so I had to upload the whole DB via SQL query, one statement at a time. Took me about 20 minutes.

In addition, I had to add
mysql_query(“SET NAMES ‘utf8’”);
as they suggested on wordpress forum.

I’m glad it finally worked out.


Thank you very much for your help!!!