lua-resty-mysql icon indicating copy to clipboard operation
lua-resty-mysql copied to clipboard

Mysql DNS backend are multi-servers,then failed to connect

Open dyrone opened this issue 7 years ago • 1 comments

XXX.svn.xxxx.net is my mysql connection DNS. The XXX.svn.xxxx.net behiding are two different servers (two IP) So when i connection to it ,there execption get out : Failed to connect: XXX.svn.xxxx.net could not be resolved (3: Host not found): nil nil, client: XXX.XXX.XXX.XX

by LOG PRINTER : ngx.log(ngx.WARN,"1: ", err, ": ", errcode, " ", sqlstate)

dyrone avatar Oct 29 '18 13:10 dyrone

@dyrone Seems like you forgot to configure the resolver directive in your nginx.conf? See

http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver

agentzh avatar Oct 29 '18 16:10 agentzh