MySQL数据库创建用户root@%

一、在Linux上以root账号登录主机

二、在主机上登录MySQL

mysql -uroot -p123456

三、先删除原来的 root@% 用户(若之前没有创建,则跳过此步骤)

drop user 'root'@'%';

四、删除成功了,再创建用户 root@%

create user 'root'@'%' identified with mysql_native_password by '123456';

五、接着授权

grant all on *.* to 'root'@'%' with grant option;

六、刷新配置

flush privileges;

七、退出

exit;

参考地址:https://blog.csdn.net/liaowenxiong/article/details/123325651

posted @   落魄的大数据转AI小哥  阅读(4060)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示