mysql编码、数据表编码查看和修改总结

页面导航:首页 > 数据库 > Mysql > mysql编码、数据表编码查看和修改总结

mysql编码、数据表编码查看和修改总结

来源: 作者: 时间:2016-01-28 09:19 【

1,查看自己安装的mysql的编码2、查看Mysql支持的编码3、查看数据库编码4、查看数据表编码(show create table user G;)5、修改my ini文件来修改编码:加上default-character-set=字符集(ut

1,查看自己安装的mysql的编码

\

2、查看Mysql支持的编码

\

3、查看数据库编码

\

4、查看数据表编码(show create table user \G;)

\

5、修改my.ini文件来修改编码:加上default-character-set=字符集(utf8.gbk.gb2312等)

6、命令行修改:alter database da_name default character set "charset' ;或 set names 'charset';或alter database testdb character set utf8;

8、查看服务和客户端字符集:

\

9、Linux系统下的修改:<喎"http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PC9wPgo8cD4xKbW8s/bK/b7dPGJyPgpbcm9vdEB3d3cuY25zY24ub3JnIH5dJCBteXNxbGR1bXAgLXUgcm9vdCAtcCBkYm5hbWUgLS1kZWZhdWx0LWNoYXJhY3Rlci1zZXQ9Z2JrICZndDsgYmFzZV91c2VyLnNxbDs8L3A+CjxwPjIpsum/tLW8s/a1xHNxbM7EvP61xLHgwus8YnI+Cltyb290QHd3dy5jbnNjbi5vcmcgfl0kIGZpbGUgYmFzZV91c2VyLnNxbCA8YnI+CqGhIGJhc2VfdXNlci5zcWw6IFVURi04IFVuaWNvZGUgdGV4dCwgd2l0aCB2ZXJ5IGxvbmcgbGluZXM8L3A+CjxwPjMp16qzydKq08O1xLHgwus8YnI+Cltyb290QHd3dy5jbnNjbi5vcmcgfl0kIGljb252IC1mIHV0Zi04IC10IGdiayBiYXNlX3VzZXIuc3FsICZndDtiYXNlX3VzZXJfZ2JrLnNxbDwvcD4KPHA+NCnBrL3Tyv2+3b/isqKy6b+0tbHHsL/itcSx4MLrPGJyPgpbcm9vdEB3d3cuY25zY24ub3JnIH5dJCBteXNxbCAtdXJvb3Q8YnI+CqGhbXlzcWwmZ3Q7IHVzZSB0ZXN0ZGI7PC9wPgo8cD5teXNxbCZndDsgc3RhdHVzOzxicj4KICAgIFNlcnZlciBjaGFyYWN0ZXJzZXQ6ICAgIGxhdGluMTxicj4KICAgIERiICAgICBjaGFyYWN0ZXJzZXQ6ICAgIGdiazxicj4KICAgIENsaWVudCBjaGFyYWN0ZXJzZXQ6ICAgIGxhdGluMTxicj4KICAgIENvbm4uIGNoYXJhY3RlcnNldDogICAgbGF0aW4xPC9wPgo8cD41Kcno1sOzydDo0qq1xLHgwus8YnI+Cm15c3FsJmd0O3NldCBuYW1lcyA="gbk';

6)查看现在的编码
> status;
Server characterset: latin1
Db characterset: gbk
Client characterset: gbk
Conn. characterset: gbk

7)导入我们转换成gbk后的文件
mysql> source base_user_gbk.sql;


Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<