0
votes

I just created a new Compute Engine instance and Cloud SQL (second generation) and Im trying to get the Cloud SQL proxy working so I can connect to Cloud SQL from Compute Engine. Here's how I installed the proxy:

wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64
mv cloud_sql_proxy.linux.amd64 cloud_sql_proxy
chmod +x cloud_sql_proxy
sudo mkdir /cloudsql; sudo chmod 777 /cloudsql

Now when I try to run the Proxy Im getting an error. Here's how Im running the proxy:

sudo ./cloud_sql_proxy -dir=/cloudsql -fuse

Here's the error Im getting:

2016/04/09 03:42:37 Protocol tcp6 not supported: listen tcp6 [::1]:0: bind: cannot assign requested address

2016/04/09 03:42:37 couldn't unmount fuse directory "/cloudsql": &exec.Error{Name:"fusermount", Err:(*errors.errorS tring)(0xc820011250)}

2016/04/09 03:42:37 Mounting "/cloudsql"...

2016/04/09 03:42:37 Could not start fuse directory at "/cloudsql": cannot mount "/cloudsql": fusermount: exec: "fusermount": executable file not found in $PATH

UPDATE:

Got this working without using Fuse. Here's the command I ran:

./cloud_sql_proxy -dir=/cloudsql --instances=my-project:us-central1:my-sql-instance-name=tcp:3306 &
mysql -u root --port 3306 --host 127.0.0.1 -p

I still see the error Protocol tcp6 not supported: listen tcp6 [::1]:0: bind: cannot assign requested address but I guess its just a warning?

1

1 Answers

1
votes

Yep, the tcp6 message is a warning - it's just stating that ipv6 is not supported on the system you're running on (a known issue in GCE). I've already removed that log message, it wasn't proving very useful (and, as you've shown, can be confusing).

The message printed right before the Proxy exited is the one you care about: it's complaining that it can't find 'fusermount', meaning that the FUSE client tools are not installed on your system. You can compile them from source if you want to use FUSE, but if you're okay with using the '-instances' flag then there's no need to go down that road.