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.Bkjia.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)查看現在的編碼
mysql> status;
Server characterset: latin1
Db characterset: gbk
Client characterset: gbk
Conn. characterset: gbk
7)導入我們轉換成gbk後的文件
mysql> source base_user_gbk.sql;