1设置mysql文件
/etc/mysql/mysql.conf.d/mysqld.cnf 下的bind-address = 0.0.0.0
2重启MySQL
Service mysql restart
3 进入mysql (Mysql–u root –p)
mysql>grant all privileges on *.* to root@"%" identified by "密码";
mysql>flush privileges;刷新
mysql>exit 退出
4 虚拟机设置为桥连接 可以自己手动设置ip
本文介绍了如何配置Ubuntu上的MySQL以允许远程连接,包括修改mysql.conf.d/mysqld.cnf文件,设置bind-address为0.0.0.0,重启MySQL服务,以及在MySQL客户端中授予root用户远程访问权限并刷新权限。

655

被折叠的 条评论
为什么被折叠?



