×
×

Knowledgebase & Downloads

The knowledgebase provides documentation written by our team. Please select a category or search for answers.

Articles

How to change database encoding from default latin1 to utf8 unicode?

Q: How can I change my database encoding from default latin1 to utf8 unicode?

A: You can change database encoding at any time but note that the data already in database will not be converted. The encoding will only work for future database operations. So we recommend to make encoding change on an empty database.

First create empty database in cPanel. Then use one the below methods:

Method 1)
In cPanel access phpMyAdmin and choose the database you want to change character set for
Click Operations and select a Collation from the drop down menu and click Go

Method 2)
Enable Remote MySQL in cPanel to be able to connect for your PC
Connect with MySQL GUI client e.g. MySQL Workbench as your hosting user to any of your databases
In SQL window ALTER encoding with a command like:

ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER DATABASE dbname CHARACTER SET latin1 COLLATE latin1_general_ci;
ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin;

Method 3)
Open a ticket and we will change encoding as requested


Powered by HostBill