How to change the MySQL database collation to make UTF-8 Compatible

November 13, 2011 | by

Few days back one of my blogger friends approached for me a help. His Joomla site displays some weird symbols and  question marks(??????????)  while typing in Hindi or any other Indian language – A very common problem faced by many Joomla users while making multi lingual sites. This is due to character encoding problems of MySQL database. If you have installed Joomla through Fantastico installer, then the default database collation is normally set with latin1_swedish_ci collation instead of utf8_general_ci. Check the database table properties in PHPMyadmin.

Here you have to convert the character set to UTF-8. You can do it through SQL queries in PHPMyadmin.  However it is a time taking process. Don’t worry about that here we have a lifesaver. Thanks to Phoca team. Download the script from here. Unzip the content to a folder of your server. You can use your local server also. Say the uploaded folder name is “collation” then type or localhost/collation. Now the following screen will appear.

Remember you have to take a backup of your database before running the script as a security measure.

collation change tool

Enter the Database host, Database username, DB password, Database Name and the  required collation(utf8_general_ci). Submit and see the progress screen.

See the changes in collation field through PHPMyadmin

Now your database is UTF8 compatible. You can use this script in other content management systems like WordPress, Joomla, Drupal etc especially if the CMS is installed through the Fantastico installer.


View all

view all