当前位置:Gxlcms >
mysql >
mysqlcreatedatabase指定utf-8编码_MySQL
mysqlcreatedatabase指定utf-8编码_MySQL
时间:2021-07-01 10:21:17
帮助过:7人阅读
如下脚本创建数据库yourdbname,并制定默认的字符集是utf8CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;如果要创建默认gbk字符集的数据库可以用下面的sql:create database yourdb DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;