FRP installation requirements
- Public IP
- FPR client and server software versions are consistent
You can directly purchase a cloud server with a public IP, which is very cost-effective for ordinary students and first orders. At the end of the article, Alibaba Cloud and Tencent Cloud connections are attached!
If you have any questions, please leave a message directly and do your best!
Start command
Start frp of the accessed machine through the following command
nohup ./frps -c ./frps.toml &
Remember to map mysql 3306 port to the external network
pit
-
mysql itself is not configured for remote access
-
frp configuration error, did not pay attention to the difference between Chinese single quotes and English single quotes
mysql itself is not configured for remote access
Problem: Lost connection to MySQL server at ‘reading initial communication packet’ appears when navacat remotely connects to mysql. Solution
The analysis should be caused by the following two reasons:
服务器有防火墙,禁止3306端口的访问。
用户没有授权远程访问。
MySQL 8.x settings allow remote access
update user set host='%' where user='root';
#再执行两次
GRANT ALL ON *.* TO 'root'@'%';
# 所有操作后,应执行
flush privileges;
First enter my.cnf on linux. It is usually in /etc/my.cnf. If it does not exist, create it yourself.
Comment out the bind-address line in my.cnf. Whether it is bind-address=127.0.0.1 or bind-address=0.0.0.0, comment out the bind-address line.
Add skip-name-resolve to my.cnf
Restart the mysql service: service mysql stop, service mysql start or just say service mysql restart
rp configuration error, did not pay attention to the difference between Chinese single quotes and English single quotes
reference
MySQL8.0 sets remote access permissions - Zhihu
Load balancing and health checking | frp
FRP multi-port configuration, please note that the title must be different, frp version 0.52.3
# 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"
Server purchase recommendations
Ali Cloud
-
# New and old cloud servers are shared for only 99 yuan/year
-
Selected activities area, you can learn about all Alibaba Cloud's current promotions