mysql> create database if not exists xdb default character set utf8;
Query OK, 1 row affected (0.00 sec)
1 先介绍一个ubuntu下mysql的可视化工具
利用命令:sudo apt-get install mysql-Workbench
2 在ubuntu12.04以后如果要设置mysql能够正常显示中文,只需要在文件/etc/mysql/my.cnf
中[mysqld]下面添加这行
character-set-server=ut8
然后保存,重启mysql服务:sudo restart mysql
INSERT INTO `member` VALUES (1,'james','john','s','1972-01-01',60,'1'),(2,'bush','pack','s','1979-09-01',60,'1'),(3,'hacker','johner','s','1952-11-01',100,'0'),(4,'busher','packer','s','1962-01-01',0,'1'),(5,'hash','newer','n','1922-05-01',60,'1'),(6,'z','y','','1962-03-01',60,'0'),(7,'g','g','','1962-04-01',60,'0'),(8,'y','y','','1962-05-01',60,'0'),(9,'??','?','s','1962-07-01',60,'0');