在my.ini文件改为:
[client]
default-character-set = utf8
port=3306
[mysql]
default-character-set=utf8
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
# The default character set that will be used when a new schema or table is
# created and no character set is defined
character-set-server=utf8
在控制台:
mysql -uroot -p123456
use test
查看表:
show create table room;
sql语句:
alter table users convert to character set utf8;