Home >Database >Mysql Tutorial >mysqlcreatedatabase指定utf-8编码_MySQL

mysqlcreatedatabase指定utf-8编码_MySQL

WBOY
WBOYOriginal
2016-05-30 17:11:201262browse

如下脚本创建数据库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;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn