《Mysql应用如何查看mysql编码与mysql版本》要点:
本文介绍了Mysql应用如何查看mysql编码与mysql版本,希望对您有用。如果有疑问,可以联系我们。
来看下面的sql语句,查看mysql数据库的当前编码:
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教程
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
--------------MYSQL教程
设置mysql数据库编码,最简单办法:
set names utf8;
MYSQL教程
维易PHP培训学院每天发布《Mysql应用如何查看mysql编码与mysql版本》等实战技能,PHP、MYSQL、LINUX、APP、JS,CSS全面培养人才。
转载请注明本页网址:
http://www.vephp.com/jiaocheng/7449.html