How to change mySQL character_set_server?

Hello admin.

My website has a form that will insert data to the table once the submit is send.
From what I saw, the data does receive but words can be garbled if it contains Chinese characters.

As the screenshot below, I think the problem came from the character_set_server, which is set to latin1.
Is there any way I can change it to utf8? I really want to make sure words can be stored properly.

Where did you see this? Please note that phpMyAdmin is known to have problems with special characters. So if you write data from your own code and retrieve it through your own code, it works perfectly. But in phpMyAdmin it’s all garbled.

I don’t quite know why this happens, but it shouldn’t prevent the use of special characters on your website


Hello, r000tmnt!
Run this query in phpMyAdmin:

set global character_set_server = (for example, cp1251);

Also there’s character set list, make sure, one that you use is typed in lowercase.

Thank you, 0x748c.
I’ll try it out later, may I ask the “for example” in the comment means the database name?

No, for example is just text, only needed a character set name.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.