现在Windows中的Navicat连接不上Linux中mysql:(远程的Navicat链接不上mysql)
1)、linux中防火墙没有关闭;(默认我给大家的这个是关闭防火墙的)
2)、设置mysql允许远程访问:
– 设置远程访问,所有的数据库.所有的表 对于 root用户 %任意,没有IP的限制 这个用户的密码
grant all privileges on . to ‘root’ @’%’ identified by ‘mysql’;
– 设置本地访问
grant all privileges on . to root@‘localhost’;
– 刷新重载
flush privileges;
3)、配置允许链接的地址
vim /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 127.0.0.1 —> 0.0.0.0
4)、重启:
sudo service mysql restart
Windows中的Navicat连接不上Linux中mysql
最新推荐文章于 2022-07-03 21:32:31 发布