1.打开文件 sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf
屏蔽:bind-address = 127.0.0.1

2.登入mysql后,更改”mysql” 数据库里的 “user” 表里的 “host”项,从”localhost”改称”%

mysql -uroot -p root
mysql->use mysql
mysql->update user set host = '%' where user ='root';
mysql->grant all privileges on *.* to 'root'@'%' with grant option;
mysql->flush privileges;
mysql->exit;
sudo /etc/init.d/mysql restart

相关文章:

  • 2021-12-31
  • 2022-12-23
  • 2021-10-05
  • 2022-01-13
  • 2021-12-19
  • 2021-05-05
  • 2021-07-18
  • 2021-06-10
猜你喜欢
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-10-08
  • 2021-12-30
相关资源
相似解决方案