I have created a very simple cloud sql database. It is a second generation mysql.
Form my other vm instance within the same project, I can ping this sql server with no issue
> ping 18.104.22.168 PING 22.214.171.124 (126.96.36.199) 56(84) bytes of data. 64 bytes from 188.8.131.52: icmp_seq=1 ttl=48 time=128 ms 64 bytes from 184.108.40.206: icmp_seq=2 ttl=48 time=126 ms 64 bytes from 220.127.116.11: icmp_seq=3 ttl=48 time=126 ms ^C --- 18.104.22.168 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 126.789/127.307/128.309/0.708 ms
The ping returns OK.
However if I try to connect using mysql client, I had a timeout
$ mysql --host=22.214.171.124 ERROR 2003 (HY000): Can't connect to MySQL server on '126.96.36.199' (110)
Apparently private IPs are not allowed to add to authorised network. What do I need to do to fix the connectivity?