添加用户
命令:create user 'username'@'host' identified by 'password'
例子:create user 'changfeng'@'%' identified by '111111'
配置用户权限
命令:grant privileges on database.table to 'username'@'host'
例子:grant all on *.* to 'changfeng'@'%' //给一个用户配置有所有数据库的权限
grant select on test.* to 'changfeng'@'%' //给一个用户配置test数据库所有表的查询权限
本文章会后续测试完善,如果想明白更多,移步:http://www.cnblogs.com/xujishou/p/6306765.html#undefined