If you want to change default character set in Mysql then first you have to open my.cnf file with below command:
in this file you have to add below line:
Under [mysqld] add below lines too:
Now to reflect changes in your my.cnf file you have to restart mysql with below command:
You can validate changes with below command :
Code:
vi /etc/my.cnf
Code:
default-character-set=utf8
Code:
default-character-set=utf8
init_connect=’SET NAMES utf8′
Code:
/scripts/restartsrv_mysql
Code:
show variables like ‘char%';