Saturday, December 9, 2017

[google-cloud-sql-discuss] Re: phpmyadmin connecting to cloud sql

Hello! I have already connected successfully from mysqlwork bench on my macbook. Really, this is just an exercise rather than a production need. Mysqlworkbench just needed IP and username/password and connected with no issues. Also, phpmyadmin connects to the locally installed mysql on the GCE instance. Is there a required firewall rule for 3306 for GCE instance? The cloud SQL and GCE instance are in the same project. 

I will review the doc for phpmyadmins configurable data but as of now still not connecting.

Thanks!

Allen

On Saturday, December 9, 2017 at 5:41:42 PM UTC-5, Kamran (Google Cloud Support) wrote:

Hello Allen,

In order to isolate the cause of issue, I'd recommend trying to connect to your Cloud SQL instance using mysql client by following the instructions described in this article. After a successful connection, you can then inspect the configuration of phpMyAdmin's client. For further information on phpMyAdmin's configurable data, you can refer to this doc. Please note that it is recommended to use mysqli as value for $cfg['Servers'][$i]['extension'] .

I hope this helps.
  


On Saturday, December 9, 2017 at 12:10:24 PM UTC-5, Allen Saslaw wrote:

Hello. I am attempting to connect phpmyadmin to cloud sql. This should be pretty simple but can't seem to make it work. I am connecting from a GCE instance. 
I have added the GCE IP address to the authorization section of my Google SQL server. Below is my config.inc settings. It simply does not connect. Errors with connection refused. What am I missing here? 
Been staring at this for too long and not sure what is missing. 

Do I need MYsql client installed and running on GCE to use phpmyadmin to connect to Google SQL? 

$cfg['Servers'][$i]['host']          = '<SERVER IP>';  $cfg['Servers'][$i]['port']          = '3306';  $cfg['Servers'][$i]['socket']        = '';  $cfg['Servers'][$i]['connect_type']  = 'tcp';  $cfg['Servers'][$i]['extension']     = 'mysql';  $cfg['Servers'][$i]['user']          = 'root';  $cfg['Servers'][$i]['password']      = 'password';  $cfg['Servers'][$i]['auth_type'] = 'config';       // keep it as config  $cfg['Servers'][$i]['AllowRoot']     = TRUE;  $cfg['Servers'][$i]['AllowNoPassword']   = TRUE;

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5576567c-5a74-40a9-a7dd-83a4d291fb86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment