创建用户并先定local访问,密码123
CREATE USER yy@localhost IDENTIFIED BY '123';
创建用户不限制登录
CREATE USER yy IDENTIFIED BY '123';
授权用户
GRANT ALL PRIVILEGES ON *.* TO user;@localhost
grant select,insert,update,delete on *.* to test1@"%" Identified by "abc";
格式:grant select on 数据库.* to 用户名@登录主机 identified by “密码”
修改密码
grant all privileges on pureftpd.* to koko@localhost identified by 'mimi';
查看用户信息
select host,user from mysql.user;
删除用户
Delete FROM user Where User='test' and Host='localhost';
刷新权限
flush privileges;