You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: