Friday, February 7, 2020

[google-cloud-sql-discuss] PHP PDO not Connecting to Cloud SQL

Hello,

I'm having problems connecting to Cloud SQL using PDO.

Can someone please help me out.


$db_server=null;
$db_username="root";
$db_password="password";
$db_database="database";
$connection=new PDO('mysql:unix_socket=/cloudsql/corvater:europe-west6:dbinstance;dbname='.$db_database,$db_username,$db_password);

--
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/7dbc9a03-e799-4545-9f38-52c122f717f2%40googlegroups.com.

No comments:

Post a Comment