Sunday, September 18, 2016

Re: [google-cloud-sql-discuss] Automating Google SQL queries in Cloud Shell

gcloud sql connect launches the stock 'mysql' client. 
You can read the guidance here on ways of passing a password to the mysql client: http://dev.mysql.com/doc/refman/5.6/en/password-security-user.html


On Sun, Sep 18, 2016 at 8:11 AM Mike Dorfman <mdorfman@mountwashington.org> wrote:
Hi!

I have a project which requires me to automate a select statement on a Google SQL database and FTP the result to a client.  It seems like the only way to connect through Cloud Shell is via "gcloud beta sql connect my-instance --user=readOnlyUser".  This then prompts for a password and I can perform queries through the command line.  What's the best way to safely (and securely) automate this process so I can run a query once an hour through Cron?

Thanks,
Mike

--
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/25467919-bd6f-415c-ba0d-b9fb48099e0d%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/CABDU3p0vpkjW0oMUWkuFZJxKmf9yZzTkM%2BhJXWM-f8CE6nsHDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment