mysql 命令行

日期:2019-09-12 浏览:65次

#查看所有用户
SELECT DISTINCT CONCAT(‘User: ”’,user,”’@”’,host,”’;’) AS query FROM mysql.user;
#新增
grant all privileges on *.* to ‘luokai’@’%’ identified by ‘luokai!@#$%^’ with grant option;
grant all privileges on luokai.* to ‘luokai’@’%’ identified by ‘luokai!@#$%^’ with grant option;
grant all privileges on luokai.* to ‘luokai’@’localhost’ identified by ‘luokai!@#$%^’ with grant option;
#删除
DELETE FROM mysql.user WHERE User=”luokai”;
#刷新
flush privileges;

没有评论

发表评论