如何使mysql 监听多端口 nginx 反代 mysql

作者: cayman 分类: 服务器技术,编程技术 发布时间: 2018-11-14 16:35
#修改并添加 nginx 的配置文件
 stream {
	upstream mysql {
	zone myapp1 64k;
	server 127.0.0.1:3366 weight=1 max_fails=3 fail_timeout=3000s;  
	}
	server {
         listen 3366;

         proxy_connect_timeout 1s;
         proxy_timeout 3000s;
         proxy_pass mysql;
	}
#该代码 作用使用3366反代 3306 

发表回复

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