MYSQL creates a database in UTF-8 format, bitsCN.com
MYSQL creates a database in UTF-8 format
Start with mysql:
Linux code
GBK: create database test2 default character set gbk COLLATE gbk_chinese_ci;
UTF8: create database 'test2' default character set utf8 COLLATE utf8_general_ci;
Eg:
Linux code
[Root @ linuxtest test] # mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or/g.
Your MySQL connection id is 5
Server version: 5.1.30-community MySQL Community Server (GPL)
Type 'help; 'or'/h' for help. type'/C' to clear the buffer.
Mysql> create database 'test' default character set utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.06 sec)
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Cacti |
| Mysql |
| Test |
+ -------------------- +
5 rows in set (0.07 sec)
This test Library is in UTF-8 format.
BitsCN.com