Joke Collection Website - Bulletin headlines - How to create a new table utf8 format in mysql?

How to create a new table utf8 format in mysql?

The method of MYSQL creating utf-8 format database;

Mysql comes first;

Linux code; ?

GBK: create the default character set gbk COLLATE gbk _ chinese _ ci of database test2.

UTF8: Create the default character set utf8 COLLATEutf8 _ general _ ci for database "test2".

eg;

Linux code www.2cto.com? ;

[root@linuxtest test] # mysql -u root -p? ;

Enter the password;

Welcome to MySQL Monitor. ? The command ends 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 & gt creates the default character set utf8 COLLATE utf8 _ general _ ci for database "test"?

The query is normal, and 1 line is affected (0.06 seconds)? ;

Mysql & gt display database;

+ - + ;

| Database? | ;

+ - + ;

| information _ schema |

| cactus? | ;

| mysql? | ;

| Test? | | ;

+ - + ;

A group of 5 lines (0.07 seconds);

This test library is in utf-8 format.