1.登录MySQL,如出现登录问题-------请见我的上两篇文章:
MySQL登录错误解决
修改MySQL密码
2.“select User,Password,Host from mysql.user;” #查看相关信息

#“%”代表所有,允许远程连接host
3.“insert into user (User,Password,Host)values(‘root’,password,’%’);”

#赋予所有权限
4.“grant all privileges on . to ‘root’@’%’ identified by ‘password’;”

5.“flush privileges;” #立即生效

6.systemctl restart mysqld.server #重启MySQL

7.如果还不能远程连接,请注意问题:放开防火墙3306端口

8.效果展示:
centos7.8设置mysql远程连接(remote mysql)

相关文章:

  • 2021-12-18
  • 2021-09-12
  • 2021-07-17
  • 2021-11-17
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2022-02-08
  • 2021-12-02
  • 2021-06-22
  • 2022-02-08
  • 2022-02-08
  • 2021-12-12
相关资源
相似解决方案