6

mysql8-root用户授权所有权限

 2 years ago
source link: http://www.blogjava.net/willpower88/archive/2021/08/05/435941.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
mysql8-root用户授权所有权限 - willpower88 - BlogJava
willpower88 对JAVA有点理解了……

随笔-203  评论-90  文章-8  trackbacks-0

-- 创建root@%
create user 'root'@'%' identified by 'pass$123';

-- 授于所有权限
grant all privileges on *.* to 'root'@'%' with grant option;

-- 设置远程登录密码
alter user root@'%' identified with mysql_native_password by 'pass$123';

-- 设置本地登录密码
alter user root@'localhost' identified with mysql_native_password by 'pass$123';

-- 刷新
flush privileges;

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK