mysql创建utf-8字符集数据库

mysql创建utf-8字符集数据库

 



CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


CREATE DATABASE 的语法:
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
[create_specification [, create_specification] ...]
create_specification:
[DEFAULT] CHARACTER SET charset_name
| [DEFAULT] COLLATE collation_name

更改数据库的字符编码
ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

转载于:https://www.cnblogs.com/handsome1013/p/9435124.html

你可能感兴趣的:(mysql创建utf-8字符集数据库)