Windows中Navicat连接虚拟机中的MySQL数据库

  1. 先确定虚拟机中mysql -uroot -p能连接上
  2. netstat -apn|grep 3306 ,如果显示的是127.0.0.1:3306

注释/etc/mysql/mysql.conf.d/mysqld.cnf 中的bind-adress 127.0.0.1

重启msyql

再次netstat -apn|grep 3306

显示的是:::3306就可以了

  1. 在虚拟机修改远程登录的权限

方法一:use msyql;update user set host=’%’ where user=‘root’

方法二:grant all privileges on . to ‘root’@’%’ identififed by ‘密码’ with grant option;

修改后

flush privileges; //刷新权限

我用方法1弄好的:Windows中Navicat连接虚拟机中的MySQL数据库

  1. 可以了

Windows中Navicat连接虚拟机中的MySQL数据库

参考

  1. windows中navicat连接虚拟机中的数据库_Lancy_新浪博客

相关文章:

  • 2021-11-08
  • 2021-07-14
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-03-08
  • 2021-07-30
猜你喜欢
  • 2021-10-23
  • 2022-01-22
  • 2021-10-26
  • 2021-06-04
  • 2021-10-10
  • 2021-08-14
  • 2021-04-03
相关资源
相似解决方案