lazysang

MYSQL要想让别人远程访问自己的数据库,必须让mysql库中user表的host字段为%,接受远程控制请求 ,可以进入mysql>use mysql;
mysql>update user set host="%" where user="root" and host="localhost";
重启数据库生效
service mysqld stop
service mysqld start
#这样别人就可以通过  mysql -h xxx.xxx.xxx.xxx(你电脑的IP) -u root -p密码 进行连接并操作数据库了。

systemctl restart mysql

分类:

技术点:

相关文章:

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