PHP and MySQL is a popular pair for web development, but sometimes we need to change the default collation to display the right language and faster for MySQL, in this case, let’s check some of simple tips to do that.

Change database collation:

Change table collation:

Change column collation:

Heres how to change all databases/tables/columns. Run these queries and they will output all of the subsequent queries necessary to convert your entire schema to utf8. Hope this helps!

Change DATABASE Default Collation

Change TABLE Collation / Char Set

Change COLUMN Collation / Char Set


One thought on “Change the default collation of MySQL database

Comments are closed.