Changing the Database Collation in PhpMyAdmin
Posted on April 23rd, 2018
Changing the Database Collation in PhpMyAdmin
A collation is a set of rules that defines how to compare and sort character strings. Every character set has at least one collation. The default character set for MySQL is latin1, with a default database collation of latin1_swedish_ci. You can also change the encoding to utf8 which is a is a common character set for non-Latin characters. The most common case is to change your MySQL collation from latin1 to utf8. This can be done by using phpMyAdmin and the steps are given below:
1) Login to your cPanel.
2) Navigate to Databases > PhpMyAdmin.
3) Select the database.
4) Click on “Operations” from the top set of tabs.
5) In the Collation box, choose your new collation from the drop-down menu. utf8_general_ci is the most common utf8 collation.
6) Then click the button “Go”.
You can also change the settings via command line:
1) Log into MySQL with SSH:
# mysql -u admin -p password
2) Enter your database password when prompted.
3) Run the following command to change the character set and collation of your database:
# ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
If you need any further help please do reach our support department.
If you have an existing plan with us, please open a ticket with our support department: https://www.interserver.net/contact-information.html
Thank You sir. It helped me alot
i need to convert my cpanel database to set utf8mb4_unicode_ci before importing, but it can’t work to me, please try to help me?
Just open your database file with NOTEPAD or NOTEPAD++ for Windows and Modify those parameters…
for my example:
CREATE DATABASE IF NOT EXISTS `zenuxmsc_foroenigma` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
I want My database to accept String like Hamza and generate error when enter an integer value what is best collation and type for that.
Kindly Reply me as soon as possible 🙂
Please contact our support via live chat or ticket system, so we can better assist you directly with any service you have ordered through us.