How can I change connection collation of mysql database?
I am using Mysql workbench 5.5 and mysql 5.5 in ubuntu 14.
When I execute a stored procedure, an error o
Look into your my.cnf
, find the contents below near collation_server
:
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
Then change your collation variables to:
collation_connection utf8_unicode_ci
collation_server latin1_swedish_ci
Remember to restart MySQL server service.
For DB collation, you can use the following SQL:
ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_unicode_ci;
or you can do it at Alter database screen in MySQL Workbench (always update this to the latest version!)