## 1.创建用户和赋权
#创建用户
create user aaaa@'localhost' identified by 'bbbb';
update mysql.user set Host='%' where User='aaaa' and Host='localhost';
#赋权
grant all privileges on *.* to aaaa@'%';
## 2.删除用户和查看
#删除用户
DROP USER 'aaaa'@'%';
#查看用户
SELECT User, Host FROM mysql.user;
#为某张表赋权限
grant all privileges on DbName.* to aaaa;
linux中mysql添加用户
于 2022-04-10 15:49:44 首次发布