mysql>create user test@‘%’ identified by ‘123456’;
mysql>create database web;
mysql>create table a1 (id int ,name char(30));
mysql>insert into a2 (id,name,age) values (1,‘zhangsan’,21);
mysql>drop user test@’%’;
mysql>delete from a2 where id=5;
mysql>delete from a2 where age between 23 and 25;
mysql>update a2 set age=21 where id=3;
mysql>alter table a2 rename a1;
mysql>describe a1;
mysql>alter table a1 modify name char(50);
mysql>describe a1;
mysql>alter table a1 change name username char(50) not null default ‘’;
mysql>describe a1;
mysql>alter table a1 add time datetime;
mysql>alter table a1 drop time;
mysql>select User,Password,Host from mysql.user;
mysql>grant all on aa.a1 to test@‘%’;#给已存在用户授权
mysql>grant all on aa.a1 to abc@‘%’ identified by ‘123456’;#创建用户并授权
mysql>revoke drop,delete on aa.a1 from abc@‘%’;#取消删除权限(登录abc测试)
mysql>show grants for abc@‘%’;#查看指定用户的授权
mysql>show grants for test@‘%’;
service mysqld start
/etc/init.d/mysqld start
mysqld_safe &
service mysqld stop
/etc/init.d/mysqld stop
mysqladmin -uroot -p123456 shutdown