Thursday, March 17, 2016

Re: [google-cloud-sql-discuss] Trying to Connect to database in PHP using PDO and Cloud SQL Proxy

To add to my previous question, below is the question I asked and answer I got from Kevin in our previous interaction 




On Thursday, March 17, 2016 at 12:48:22 AM UTC-4, wob...@yblew.com wrote:
It seems the only thing stable is below, however it seems I have to assign all databases in mysql to dev@'cloudsqlproxy~%' user before I can see interact with database through the proxy via non socket which is weird; can you confirm? I checked developmentDB.json and it's an editor of all my insitances. If I remember correctly, Kevin said I don't have to assign dev@'cloudsqlproxy~%' to anything, just create it and i'm all set. 

sudo ./cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:sql-inst=tcp:3308 -credential_file=/root/developmentDB.json &

I also tried below for php/mysqli and got permission denied on the browser but it worked for php/pdo in browser

./cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:sql-inst &
mysql -u <user_name> -S /
cloudsql/my-project:us-central1:sql-inst

On Wednesday, March 16, 2016 at 5:07:10 PM UTC-4, Vadim Berezniker wrote:
No, I see the same problem. I filed an issue to investigate: https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/7
Can you use the non-fuse mode as a workaround until the issue is resolved?

On Wed, Mar 16, 2016 at 1:46 PM <wob...@yblew.com> wrote:
So after you disabled Selinux it worked for you?

--
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/58c2ac04-1a5e-4c47-91fc-2d3fa3116925%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/2cfb2f9b-2e80-46ee-b372-1bf43eb81d74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment