1. 程式人生 > >Mysql的字符集檢視與修改

Mysql的字符集檢視與修改

Show variables like “%char%”
修改mysql的字符集
----資料庫級
1)臨時的修改
Set global character-set_server=utf8
2)永久修改
Alter database commany set utf8 collate utf8_general_ci;

----表級別
Alter table commany default charset=utf8
----列級別
Alter table commany.name change name varchar(15) character set utf8 collate utf8_general_ci;