欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Mysql创建用户

程序员文章站 2022-06-01 08:50:17
...
insert into mysql.user (user,host,password) values('jiangjianyi','%',password('jiangjianyi'));
CREATE USER 'jiangjianyi'@'%' IDENTIFIED BY 'jiangjianyi';
flush privileges;
CREATE USER 'jiangjianyi'@'%' IDENTIFIED BY "123";
grant all on user.address to 'jiangjianyi'@'%'
GRANT SELECT,INSERT,DELETE,UPDATE,CREATE,INDEX ON *.* TO 'jiangjianyi'@'%' IDENTIFIED BY 'jiangjianyi' WITH GRANT OPTION;
UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='jiangjianyi';
FLUSH PRIVILEGES;
grant select,insert,update,create,drop,delete on sss.* to [email protected]'%' identified by 'sss';
相关标签: MySQL 学习