Unable to connect to Cloud SQL
See original GitHub issueI can’t connect from App Engine to Cloud SQL by unix socket nor by TCP.
var mysql = require('mysql');
var mysqlConf = {
user: 'root',
password: '',
socketPath: '/cloudsql/<appli-id>:<instance>',
database: 'myDb'
};
connection = mysql.createConnection(mysqlConf);
connection.connect(function(err) {
if (err)
return callback(err);
return callback();
});
it throws :
Error: connect ENOENT
at exports._errnoException (util.js:746:11)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
I’m using Nodejs 4.1.1.
Also I have no problem to connect to Cloud SQL from my localhost through TCP.
Am I missing something?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Debugging connection issues | Cloud SQL Documentation
Common connection issues · Verify that your application is closing connections properly · Verify that your certificates have not expired · Verify that...
Read more >Cannot connect Google Cloud SQL in MySql Workbench
Go to your sql instance · Go to Connections tab · Under Connectivity select public IP and add a network by giving CIDR...
Read more >Unable to connect to CloudSQL instance using IP address if ...
1. Go to the "Access Control" page for the CloudSQL instance in the management UI. 2. Check "Only allow SSL connections" on the...
Read more >Unable to connect cloud SQL postgres
Any help should appreciated, I have been trying to connect prostgres DB instanc using python3.5 , Flask using sqlalchemy, Used below line to...
Read more >How to Connect to GCP Cloud SQL Instances in ...
Since both Cloud SQL and Cloud Run are on the Google Cloud Platform, it's better to connect by private IP for minimum network...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is probably a better tutorial for connecting to Cloud SQL: https://cloud.google.com/appengine/docs/flexible/nodejs/using-cloud-sql
Can someone post an example of using a socketPath that uses TCP and Google Cloud SQL with a proxy?