I'm UodRad

I'm UodRad



MySQL-8.0配置ROOT用户远程登录

uodrad · 2025-04-02 · 103浏览 · 干货


本次操作基于Ubuntu 22.04

1.进入mysql命令行执行:

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你的密码' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

2.然后修改mysql配置文件:vim /etc/mysql/mysql.conf.d/mysqld.cnf,找到并将bind-address = 127.0.0.1注释掉:

# bind-address           = 127.0.0.1

3.重启mysql服务,然后就可以远程登录了:

sudo service mysql restart



thumb_up赞赏文章


comment 评论区

添加新评论





  • ©2025 bilibili.com

textsms
内容不能为空
account_circle
昵称不能为空
email
邮件地址格式错误
web
beach_access
验证码不能为空
keyboard发表评论


star_outline 咱快来抢个沙发吧!




©2025 I'm UodRad

渝ICP备2025056822号-1


Theme Romanticism2.1 by Akashi
Powered by Typecho