MySQL中文問題
-- 設(shè)置客戶端顯示字符集
mysql>set names utf8;
-- 建表時設(shè)置表的字符集和引擎
CREATE TABLE table (
`abc` char(32) NOT NULL,
`abc_message` varchar(256) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
-- 查看
show variables like 'character%';
-- 設(shè)置客戶端顯示字符集
mysql>set names utf8;
-- 建表時設(shè)置表的字符集和引擎
CREATE TABLE table (
`abc` char(32) NOT NULL,
`abc_message` varchar(256) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
-- 查看
show variables like 'character%';