MySQL Change environment default character set is Utf-8 (of course you can also set to other, international point or utf-8 Good)
assume that the MySQL character set is not unified. There's still a bit of trouble back there.
first you have to turn off the MySQL service in the service (be sure to turn off the MySQL service and change it first)
then go to your MySQL installation path. Assuming that you define your own path, the default is:C:\Program files\mysql\mysql Server 5.0\my.ini. (There is not this, the lower version is Mysql-default.ini)
find that [client] [MySQL] add : default-character-set=utf8
Mysqld added below: Default-character-set=utf8
init_connect= ' SET NAMES UTF8 '
start MySQL service again after saving
then use the following statement to see if the encoding has changed:
Show variables like ' char% ';
It 's good to say that.
Suppose that your previous database was not set up well:
For a database that already exists, you can change the encoding by doing the following:
A. Change the MySQL database encoding. The assumption is that the MySQL database is not encoded: the ability to run in MySQL such as the following command: ALTER database test DEFAULT CHARACTER SET UTF8;
MySQL changes the default environment of the character set to Utf-8