介绍:
http { ... upstream dbgroup { # 连接句柄 drizzle_server host1:3306 dbname=test password=pass user=alice protocol=mysql; #连接池 drizzle_keepalive max=200 overflow=reject; } ... server{ location ~ ‘^/cat/(.*)‘ { set $name $1; set_quote_sql_str $quoted_name $name; drizzle_query "select * from cats where name=$quoted_name"; drizzle_pass my_mysql_backend; rds_json on; } } }
原文:https://www.cnblogs.com/-wenli/p/13571431.html