xiaoruitao 发表于 2010-9-7 17:37:09

mysql乱码

php程序添加的 記录 用 php读出 显示中 文.用 mysql登录上 去 显示乱 码.
mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client   | utf8                     |
| character_set_connection | utf8                     |
| character_set_database   | utf8                     |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                     |
| character_set_server   | utf8                     |
| character_set_system   | utf8                     |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

kider 发表于 2010-9-8 00:38:23

你是用什么登陆MySQL的?
mysql> set names utf8; 一般都能解决问题。
其他,搜索“乱码”:http://www.mysqlpub.com/search.php

xiaoruitao 发表于 2010-9-8 08:48:47

用mysql命令行登陆MySQL或phpmyadmin,phpadminer都显示乱码。
mysql> set names utf8;运行过了。
页: [1]
查看完整版本: mysql乱码