windows下mysql 乱码解决
1,登录mysql
2,show variables like'character%';
mysql> show variables like 'character%';
+--------------------------+----------------------------------------------------
-----+
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
-----+
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database | lartin1
|
| character_set_filesystem | binary
|
| character_set_results | utf8
|
| character_set_server | lartin1
|
| character_set_system | utf8
|
| character_sets_dir | E:\Program Files\MySQL\MySQL Server 5.0\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)
3,set character_set_database=utf8;
set character_set_server=utf8;
4,重启mysql服务。
1,登录mysql
2,show variables like'character%';
mysql> show variables like 'character%';
+--------------------------+----------------------------------------------------
-----+
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
-----+
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database | lartin1
|
| character_set_filesystem | binary
|
| character_set_results | utf8
|
| character_set_server | lartin1
|
| character_set_system | utf8
|
| character_sets_dir | E:\Program Files\MySQL\MySQL Server 5.0\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)
3,set character_set_database=utf8;
set character_set_server=utf8;
4,重启mysql服务。