-> use mysql; //选择数据库 -> select host,user,password from user; //查询已有用户 -> insert into user (host,user,password) values(‘localhost‘,‘kiscms‘,password(‘kiscms‘)); //插入一个用户 -> select host,user,password from user; //再次查询用户 -> flush privileges; //重载权限 -> show grants for ‘kiscms‘@‘localhost‘; //查询权限 -> GRANT ALL PRIVILEGES ON kiscms.* TO ‘kiscms‘@‘localhost‘ IDENTIFIED BY "kiscms" WITH GRANT OPTION; //赋予权限 -> flush privileges; //重载权限 -> show grants for ‘kiscms‘@‘localhost‘; //查询权限
原文:http://www.cnblogs.com/buexplain/p/5225197.html