通过下面命令启动访问机器的frp

nohup ./frps -c ./frps.toml  &

问题 navacat 远程链接mysql 出现 Lost connection to MySQL server at ‘reading initial communication packet’的解决办法

分析应该是以下两个原因导致的:

服务器有防火墙,禁止3306端口的访问。
用户没有授权远程访问。
update user set host='%' where user='root';

#再执行两次

GRANT ALL ON *.* TO 'root'@'%';

# 所有操作后,应执行
flush privileges;

首先进入linux上的my.cnf。一般都是在/etc/my.cnf,如果没有则自行创建

my.cnf里面的bindaddress一行注释掉,无论是bindaddress=127.0.0.1还是bindaddress=0.0.0.0,都把bindaddress这行注释注释掉。

my.cnf中加上skipnameresolve

重启mysql服务service mysql stopservice mysql start或者直接一句service mysql restart ———————————————— 版权声明本文为CSDN博主「Android_la」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:远程连接MySQL数据库失败2013-Lost connection to MYSQL server at ‘reading for initial communication packet‘_2013 – lost connection to mysql server at ‘reading-CSDN博客

内网穿透工具frp简单使用,访问内网机器指定端口 – 知乎

远程连接MySQL数据库失败2013-Lost connection to MYSQL server at ‘reading for initial communication packet‘_2013 – lost connection to mysql server at ‘reading-CSDN博客

MySQL8.0设置远程访问权限 – 知乎

TCP & UDP | frp

负载均衡与健康检查 | frp

# frpc.toml
[[proxies-test1]]
name = "test1"
type = "tcp"
localPort = 8080
remotePort = 80
loadBalancer.group = "web"
loadBalancer.groupKey = "123"

[[proxies-test2]]
name = "test2"
type = "tcp"
localPort = 8081
remotePort = 80
loadBalancer.group = "web"
loadBalancer.groupKey = "123"

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注