Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: getaddrinfo ENOTFOUND "xx.xxx.xx.xx" #126

Open
LoickMEYER opened this issue Jan 11, 2022 · 0 comments
Open

Error: getaddrinfo ENOTFOUND "xx.xxx.xx.xx" #126

LoickMEYER opened this issue Jan 11, 2022 · 0 comments

Comments

@LoickMEYER
Copy link

Hello,
I am using serverless-mysql on Next.Js

I have followed the example on the documentation and on my computer this working very fine, I can connect to the database et get the rows. My Database is on my VPS not on my localhost.

But when i deploy my code on Vercel, and I try to access to /api/hello In my vercel log I have this error :
[GET] /api/hello { error: Error: Error: getaddrinfo ENOTFOUND "xx.xxx.xx.xx" at connect (/var/task/node_modules/serverless-mysql/index.js:80:15) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Object.query (/var/task/node_modules/serverless-mysql/index.js:182:5) at async excuteQuery (/var/task/.next/server/pages/api/hello.js:33:25) at async handler (/var/task/.next/server/pages/api/hello.js:59:24) at async Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils.js:102:9) at async Server.handleApiRequest (/var/task/node_modules/next/dist/server/next-server.js:1064:9) at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:951:37) at async Router.execute (/var/task/node_modules/next/dist/server/router.js:222:32) at async Server.run (/var/task/node_modules/next/dist/server/next-server.js:1135:29) }

My database accept connection from outside because I can access to it on my computer.

I have also correctly configured the .env var in project settings.

Thank you very much for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant