lua-resty-mysql
lua-resty-mysql copied to clipboard
Can not connect to mysql by setting mysql_host = xxxxxxxxxx.mysql.rds.aliyuncs.com
Aliyun RDS server require mysql_host using domain name. When I set "mysql_host = xxxxxxxxxx.mysql.rds.aliyuncs.com", I found can not connect to mysql.
Error info: failed to connect: no resolver defined to resolve "xxxxxxxxxxxx.mysql.rds.aliyuncs.com".
How can I do about it.
@huuuunt The error message clearly indicates that you have not defined any resolvers in your nginx.conf. See http://nginx.org/r/resolver for details.
Thanks!! Done!
@agentzh I am having similar issue while linking docker container to openresty. The named container does not work and I get this error
failed to connect: failed to connect: no resolver defined to resolve "mysql": nil nil
mysql here is the container name. Nginx is able to resolve my all other containers such as php, hhvm but in my lua script is not able to.