MYSQL---Build character Set database

Source: Internet
Author: User

Create databases < database name >

Mysql> Show CREATE Database oldboy\g
1. Row ***************************
Database:oldboy
Create database:create Database ' Oldboy '/*!40100 DEFAULT CHARACTER SET UTF8 */
1 row in Set (0.00 sec)

Establish a GBK character set database named OLDBOY_GBK


Mysql> CREATE DATABASE Oldgirl CHARACTER SET GBK COLLATE gbk_chinese_ci;
Query OK, 1 row Affected (0.00 sec)

Mysql> Show CREATE Database oldgirl\g
1. Row ***************************
Database:oldgirl
Create database:create Database ' oldgirl '/*!40100 DEFAULT CHARACTER SET GBK */

View character set and proofing rules: show character set; Create database commands in different character set formats
Create Database Oldboy; <== The default database configuration, which is equivalent to creating a Latin character Set database.
Create DATABASE OLDBOY_GBK DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci; #<== creating the GBK character Set database
Create DATABASE Oldboy_utf8 DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci; <== creating the UTF8 character Set database

MYSQL---Build character Set database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.