Hi,
I have a web server and a database server. I'm using the Nginx Drizzle Module to try to connect the two. On my web server, I have the following in my nginx.conf file:
upstream backend {
drizzle_server <DATABASE_SERVER_IP> dbname=mydbname
user=myuser password=mypass protocol=mysql;
}
I also have this pasted in my server block for testing: https://github.com/openresty/drizzle-nginx-module#last-insert-id
In my browser when I go to <WEB_SERVER_IP>/test, I get a 502 error. When I check the error.log file, I see:
Access denied for user 'myuser'@'<WEB_SERVER_IP>' (using password: YES) while connecting to drizzle upstream, client: <MY_LOCAL_IP>, server: localhost, request: "GET /test HTTP/1.1", subrequest: "/mysql", upstream: "drizzle://<DATABASE_SERVER_IP>:3306", host: "<WEB_SERVER_IP>"
So even though I'm defining the drizzle_server with <DATABASE_SERVER_IP>, the host is being set to <WEB_SERVER_IP>.
What am I missing?
Thanks