首页 > 数据库 >nginx代理mysql

nginx代理mysql

时间:2023-02-25 14:58:07浏览次数:39  
标签:timeout 代理 server nginx proxy conf mysql

[root@zhyly-pre-003 4-layer-conf.d]# cat mysql.conf
upstream mysql {
    server 192.168.2.6:3306;
}

server {
     listen  8083;
     proxy_pass mysql;
}

[root@zhyly-pre-003 4-layer-conf.d]# /usr/local/nginx/sbin/nginx  -s reload


stream {
	upstream rds {
		server 10.27.166.107:33086 max_fails=3 fail_timeout=30s; 
	}
	server {
		listen 8085;
		proxy_connect_timeout 2s;  #后端服务器连接的超时时间_发起握手等候响应超时时间(默认60秒)
		proxy_timeout 900s;  #接收后端响应内容超时
		proxy_pass rds;
	}
}

标签:timeout,代理,server,nginx,proxy,conf,mysql
From: https://www.cnblogs.com/anslinux/p/17154406.html

相关文章

  • mysqldump使用帮助
    导出sql文件可以使用mysqldump。主要有如下几种操作:导出整个数据库(包括数据库中的数据):mysqldump-h主机-uusername-ppassworddbname>dbname.sql;导出数据库中的......
  • PyMySQL连接
    title:Pymysql连接author:杨晓东permalink:Pymysql连接date:2021-10-0211:27:04categories:-投篮tags:-demoPymysqlMySQL数据库_连接"""一、python实......
  • 编译nginx设置自动启动
    nginx设置自动启动第一步在/etc/rc.d/rc.local中添加nginx启动命令行:/usr/local/nginx/sbin/nginx第二步然后添加执行权限chmod+x/etc/rc.d/rc.local第三步重启......
  • spider_ip代理 - 验证
    title:spider_ip代理-验证author:杨晓东&敖昀阳permalink:spider_ip代理-验证date:2021-10-0211:27:04categories:-投篮tags:-demospider_ip代理-验......
  • MySQL_demo_50道习题
    title:MySQL_demo_50道习题author:杨晓东permalink:MySQL_demodate:2021-10-0211:27:04categories:-投篮tags:-demo表名和字段–1.学生表Student(s_id,s......
  • PyMySQL查询
    title:PyMySQL查询author:杨晓东permalink:PyMySQL查询date:2021-10-0211:27:04categories:-投篮tags:-demoPyMySQLMySQL数据库_查询"""数据库查询操......
  • PyMySQL插入
    title:PyMySQL插入author:杨晓东permalink:PyMySQL插入date:2021-10-0211:27:04categories:-投篮tags:-demoPyMySQLMySQL数据库_插入#!/usr/bin/pytho......
  • PyMySQL创建
    title:PyMySQL创建author:杨晓东permalink:PyMySQL创建date:2021-10-0211:27:04categories:-投篮tags:-demoPyMySQLMySQL数据库_创建#!/usr/bin/pytho......
  • PyMySQL更新
    title:PyMySQL更新author:杨晓东permalink:PyMySQL更新date:2021-10-0211:27:04categories:-投篮tags:-demoPyMySQLMySQL数据库_更新"""数据库更新......
  • 【Java】 java | java连接mysql报错 | Unsupported record version Unknown-0.0
    一、错误信息UnsupportedrecordversionUnknown-0.0二、问题jdbc的ssl连接问题三、解决jdbc:mysql://192.168.100.122:3306/torna?useUnicode=true&characterEncoding=utf......