Computer >> Computer tutorials >  >> Programming >> MySQL

Change MySQL default character set to UTF-8 in my.cnf?


To change MySQL default character set to UTF-8 in my.cnf, firstly reach the location of my.cnf file.

The following is the screenshot of “my.cnf” file. Firstly, open the C: directory and the “Program Data” folder −

Change MySQL default character set to UTF-8 in my.cnf?

Now, click on “MySQL” folder −

Change MySQL default character set to UTF-8 in my.cnf?

Now, click the MySQL Server 8.0 folder and open it −

Change MySQL default character set to UTF-8 in my.cnf?

After opening MySQL Server 8.0, you will get “my.cnf” file location.

Change MySQL default character set to UTF-8 in my.cnf?

After opening my.cnf file, you will get the character-set. Open the file and the following contens are visible −

Change MySQL default character set to UTF-8 in my.cnf?

Now you can change the character-set to utf8.