查看mysql编码和版本

mysql> show Variables like ‘%set%’;
+————————–+————————————+
| Variable_name            | Value                              |
+————————–+————————————+
| auto_increment_offset    | 1                                  |
| character_set_client     | latin1                             |
| character_set_connection | latin1                             |
| character_set_database   | latin1                             |
| character_set_filesystem | binary                             |
| character_set_results    | latin1                             |
| character_set_server     | latin1                             |
| character_set_system     | utf8                               |
| character_sets_dir       | /data/mysql5/share/mysql/charsets/ |
+————————–+————————————+
9 rows in set (0.00 sec)

mysql> \s

————–

./mysql Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (i686) using EditLine wrapper

Connection id:          145

Current database:

Current user:           root@localhost

SSL:                    Not in use

Current pager:          stdout

Using outfile:          ”

Using delimiter:        ;

Server version:         5.0.22-log

Protocol version:       10

Connection:             Localhost via UNIX socket

Server characterset:    latin1

Db     characterset:    latin1

Client characterset:    latin1

Conn. characterset:    latin1

UNIX socket:            /tmp/mysql.sock

Uptime:                 2 days 20 hours 48 min 32 sec

Threads: 2 Questions: 728 Slow queries: 0 Opens: 0 Flush tables: 2 Open tables: 66 Queries per second avg: 0.003

————–

设置编码

SET NAMES utf8;

 » 转载请注明来源:网络蛀虫小窝 » 《查看mysql编码和版本》
 » 本站地址:http://www.gomoth.com
  • 您可能感兴趣的相关文章