Database Connection Issue node js

Local Machine

Error Message

Error: getaddrinfo ENOTFOUND sql311.iXXXX
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26)
Emitted ‘error’ event on Connection instance at:
at Connection._notifyError (C:\Users\gwala\carRental\rental_api\node_modules\mysql2\lib\connection.js:252:12)
at Connection._handleFatalError (C:\Users\gwala\carRental\rental_api\node_modules\mysql2\lib\connection.js:183:10)
at Connection._handleNetworkError (C:\Users\gwala\carRental\rental_api\node_modules\mysql2\lib\connection.js:196:10)
at Socket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAnocess/task_queues:82:21) {
errno: -3008,
code: ‘ENOTFOUND’,
syscall: ‘getaddrinfo’,
hostname: ‘sql311.iXXX’,
fatal: true
}

Other Information

the hostname is correct but i have just hidden it

you cant connect to infinityfree dbs from outside infinityfree servers. infinityfree mysql hostname cannot be accessed over the internet.

6 Likes

Adding this article to what @Dev-I-J said:

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.