您的位置:首页 > 数据库 > MySQL

ubuntu mysql支持中文

2015-04-23 16:00 155 查看
vim /etc/my.cnf

[client]

default-character-set=utf8

检查数据表所有字段的状态:

show full columns from $(table);

发现字段项非utf8,修改方法:

alter table
$(table) change $(columns)
$(columns) varchar(100) character set utf8 collate utf8_unicode_ci not null default '';

mysql授权命令

grant all privileges on $(database).* to "$(user)"@"%"identified by "$(password)";

grant
all privileges on $(database).* to "$(user)"@"localhost"identified by "$(password)";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: