1、创建用户
格式:grant 权限 on 数据库.* to 用户名@登录主机 identified by "密码"
mysql>grant all on *.* to [email protected]"%" identified by "123456";
mysql>flush privileges;
2、修改密码
mysql>update mysql.user set password=password(‘123456‘) where User=‘test‘ and Host=‘localhost‘;
mysql>flush privileges;
3、删除用户
mysql>delete from user where user=‘test1‘ and host=‘localhost‘;
mysql>flush privileges;
时间: 2024-11-05 16:07:21