InMotion Hosting Support Center

How to Convert a Database to UTF-8

Category: Phplist

2014-04-11 6:04 am EST

Hits: 76
According to your reference on

we followed your solution and run the php program, but this gave me the following error:

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 'character set set COLLATE hebrew_general_ci'

Please help me solving this problem

You must login before you can ask a follow up question.

You must login before you can submit an answer.



9,968 Points
2014-04-11 12:18 pm EST
Hello Karthej, and thanks for your question.

It looks like you might have possible mistyped something from our <a href="" target="_blank">how to convert a database to UTF-8</a> guide.

The part of your query it seems to be complaining about is <span style="color: red;">'character set set COLLATE hebrew_general_ci'</span>

That line should read <span style="color: red;">CHARACTER SET $char_set COLLATE hebrew_general_ci"</span> in your code.

Notice how after <span style="color: red;">SET</span> it should use the <span style="color: red;">$char_set</span> variable set at the very top of the script by default to <span style="color: red;">$char_set = 'new character set'; </span>.

It looks like you've possibly set that variable to just be <span style="color: red;">set</span>, and so your SQL query has <span style="color: red;">set set COLLATE</span> in it, instead of the correct <span style="color: red;">set utf8 COLLATE hebrew_general_ci</span> that it should.

Please let us know if that fixes your issue.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Social Media Login

Social Login Joomla

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!