如下,`sname`列我在数据库里放了中文,在这里显示不出来?Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.30-community MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use test;
Database changed
mysql> select*from student;
+-----+-----------+
| sid | sname |
+-----+-----------+
| 1 | |
| 2 | |
| 3 | |
+-----+-----------+
3 rows in set (0.00 sec)而且这里也显示utf8,到底是哪里出问题了?
mysql> show variables like'character%';
+--------------------------+----------------------------------------------------
-----------+
| 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 | C:\Program Files (x86)\MySQL\MySQL Server 5.1\share
\charsets\ |
+--------------------------+----------------------------------------------------
-----------+
8 rows in set (0.00 sec)
Your MySQL connection id is 11
Server version: 5.1.30-community MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use test;
Database changed
mysql> select*from student;
+-----+-----------+
| sid | sname |
+-----+-----------+
| 1 | |
| 2 | |
| 3 | |
+-----+-----------+
3 rows in set (0.00 sec)而且这里也显示utf8,到底是哪里出问题了?
mysql> show variables like'character%';
+--------------------------+----------------------------------------------------
-----------+
| 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 | C:\Program Files (x86)\MySQL\MySQL Server 5.1\share
\charsets\ |
+--------------------------+----------------------------------------------------
-----------+
8 rows in set (0.00 sec)
英文的可以,就是中文的有问题看看字符集设置的是不是utf-8