View Full Version : how to change the language setting of mysql
freelylw
12-16-2006, 06:49 PM
I have to set the mysql charset to UTF-8 when I using the phpsurvey, does anybody knows how to do this in Cpanel ??? can i change the setting of mysql and how to change it? otherwise I can't use the phpsurvey in my language ~~~
thank you very much !!!!!:)
McCoy
12-16-2006, 11:24 PM
You have to do it in phpMyAdmin.
You have to go to "operations" inside each database and select your charset under "collation" section.
Then you have to go inside each table, go again to "operations" and change their collation too, because by changing the database's collation you are not changing the collation of its tables. I know, it is very tiresome but there is no other way. The best way would be to define all the tables as UTF-8 when you create them, and phpsurvey should do on its installation script if it really needs it...
Maybe a quicker way, after you have changed the collation of the general database, would be to use the SQL query:
ALTER TABLE `tablename` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
You will have to change "tablename" with the name of each table in the database, one at a time. There is no way I know to alter multiple tables at the same time only with a SQL query, sorry. You can make a quick & dirty PHP script to do that if you want, it's not too difficult.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.