I am using typeorm and with ;extra.socketPath; in the ormconfig file. I'm getting:
Error : Error: connect ENOENT /cloudsql/[project:region:instance] at
PipeConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
The ormConfig.json file contains the following JSON content:
{
"type": "mysql",
"extra": {
"socketPath": "/cloudsql/[project:region:instance]"
},
"username": "root",
"password": "xxxx",
"database": "yyy",
"synchronize": true,
"logging": false,
"entities": [
"build/entity/**/*.js"
]
}
Original poster found a fix in an identical post on TypeOrm’s github page. They got it to work by using the Cloud SQL IP as their host and changing their firewall to allow it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With