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';