1. mysqld -install //装载MySQL
2. net start mysql //启动MySQL
3. create database student; //创建数据库
4. show databases; //查看所有数据库
5. use student; //使用当前数据库
6. describe student; //查看表头详情信息
7. mysql> create table students //创建数据表
-> (
-> id int unsigned not null auto_increment primary key,
-> name char(8) not null,
-> sex char(4) not null,
-> age tinyint unsigned not null,
-> tel char(13) null default "-");
8. show tables; //查看所有表
9. show create database test; //查看test数据库的编码格式
10. show create table yjdb; //查看yjdb数据表的编码格式
11. alter database student default character set utf8 collate utf8_general_ci;
12. alter table students default character set utf8 collate utf8_general_ci;
13. show variables like 'character_set_%';
14. select user,host,password from mysql.user; //查看所有用户
15. delete from mysql.user where user=''; //删除匿名用户