安装了MySQL 5.0.26(默认字符集utf-8(个人认为应该是字符编码))之后,运行MySQL Command Line Client,输入密码后,信息如下:
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 2 to server version: 5.0.26-community-nt
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
在提示符后输入:SET NAMES gbk; (如果安装MySQL选择了默认字符集是gbk就不用这一步)
然后建表(参考MySQL5.1 参考手册3.6.9)
mysql> SET NAMES gbk;
Query OK, 0 rows affected (0.00 sec)
mysql> use test
Database changed
mysql> CREATE TABLE animals(
-> id ME