A MySQL database character set controls which characters can be stored in the database.
A collation controls how text is sorted and compared inside the database.
You may need to change the character set or collation if your website displays strange characters, has imported database content from another server, or requires a specific database format.
This guide explains how to change a MySQL database character set and collation using phpMyAdmin from DirectAdmin.
Before You Start
Changing the character set or collation of a database can affect how your website stores and displays text.
Before making changes, we recommend exporting a backup of your database first.
If you are unsure which character set or collation your website requires, contact your website developer or HostworX Support before continuing.
Step 1 – Log Into DirectAdmin
Open your browser and visit: https://cp.yourdomain.co.za (Replace yourdomain.co.za with your own domain name.)
Enter your DirectAdmin username and password.
Click: Log In
Step 2 – Open phpMyAdmin
Once you are logged into DirectAdmin, open phpMyAdmin.
Click: Account Manager
Then click: phpMyAdmin
DirectAdmin may open phpMyAdmin in a new browser tab.
Step 3 – Select the Database
In phpMyAdmin, look at the left-hand side of the screen.
Click: Your database name
Make sure you select the full database, not only one table inside the database.
Step 4 – Open the Operations Tab
After selecting the database, open the database settings area.
Click: Operations
Step 5 – Change the Database Collation
Scroll down until you find the collation settings.
Locate: Collation
Select the collation you want to use.
For many modern websites, a common option is:
utf8mb4_unicode_ci
Another common option is:
utf8mb4_general_ci
If your website or application has specific requirements, use the collation recommended by the website developer or application documentation.
Step 6 – Save the Change
After selecting the required collation, save the change.
Click: Go
phpMyAdmin will update the database collation.
Changing Table Collation
Changing the database collation does not always change every existing table automatically.
If you need to change the collation of a specific table, you can do this from phpMyAdmin.
Click: Your database name
Then click: The table you want to change
Click: Operations
Locate: Collation
Select the required collation.
Click: Go
Changing Column Collation
Some websites may also store text in individual database columns that use a different collation.
Only change column collation if you know exactly which column needs to be changed.
Click: Your database name
Then click: The table you want to edit
Click: Structure
Locate: The column you want to change, example: post_title
Click: Change
Locate: Collation
Select the required collation.
Click: Save
Which Collation Should I Use?
For most modern websites, a utf8mb4 collation is recommended because it supports a wider range of characters, including special symbols and emojis.
Common examples include:
utf8mb4_unicode_ci
utf8mb4_general_ci
Do not change the collation randomly if your website is working correctly.
Changing the wrong setting may cause text display issues or database errors.
Important Notes
Please keep the following in mind:
- Always export a database backup before making database changes.
- Make sure you are editing the correct database.
- Changing the database collation may not automatically update all tables and columns.
- Some websites require a specific database character set or collation.
- If your website shows errors after the change, restore your backup or contact HostworX Support.
Conclusion
phpMyAdmin allows you to change the character set and collation settings for a MySQL database, table, or column.
These settings control how text is stored, sorted, and displayed.
Only change these settings when needed, and always make a backup before making database changes.


