How to set MySQL default charset in Windows XAMP

Dávid Csejtei
1 min readDec 10, 2017

MySQL has the latin1_swedish_ci as default charset but I need to set utf-8.

Append the following lines to the end of my.ini:

[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci

Now you have to restart the MySQL server to apply changes.

--

--