创建用户 | insert intomysql.user(Host,User,Password)values('localhost','test',password("123")) 解释:localhost(Host)表示只能在本机登陆(使用区域),test为用户名,password内为密码 |
授予权限 | grant all privileges on bos.* to test@localhost identified by '123'; 解释:bos为数据库名 |
部分权限 | grant select,delete,update,create,drop on*.* to test@"%" identified by "123"; |
刷新系统权限表 | flush privileges; |
显示数据库 | show databases; |
取消权限 | revoke all on *.* from test@localhost ; |