Nginx 代理MySQL 流量
这个要配置和http 平级
stream {
upstream mysql {
hash $remote_addr consistent;
server local.mysql.com:3306 max_fails=3 fail_timeout=30s;
}
server {
listen 13306;
proxy_connect_timeout 30s;
proxy_timeout 600s;
proxy_pass mysql;
}
}