Last active
September 27, 2024 11:20
-
-
Save goodwill/a981c2912ae6a83761a624f657f34d9f to your computer and use it in GitHub Desktop.
Revisions
-
goodwill revised this gist
Jan 13, 2018 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,9 @@ 1. We assume you already read this: https://cloud.google.com/sql/docs/mysql/connect-external-app#proxy and created a service account for Cloud SQL Client 1. Download cloud_sql_proxy to `/usr/local/bin` 1. Make the following folders, all chown to `root:root` : 1. `/var/run/cloud-sql-proxy` 1. `/var/local/cloud-sql-proxy` 1. Copy downloaded credential json file inside `/var/local/cloud-sql-proxy`, make sure only root can read as it is credential for connection. 1. Copy above gist to `/lib/systemd/system/cloud-sql-proxy.service` 2. Run `systemctl daemon-reload` 3. Run `systemctl start cloud-sql-proxy` -
goodwill revised this gist
Jan 13, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ 1. We assume you already read this: https://cloud.google.com/sql/docs/mysql/connect-external-app#proxy and created a service account for Cloud SQL Client 1. Download cloud_sql_proxy to `/usr/local/bin` 1. Make the following folders, all chown to `root:root` : 1.1. `/var/run/cloud-sql-proxy` 1.1. `/var/local/cloud-sql-proxy` 1.1. Copy downloaded credential json file inside `/var/local/cloud-sql-proxy`, make sure only root can read as it is credential for connection. 1. Copy above gist to `/lib/systemd/system/cloud-sql-proxy.service` 2. Run `systemctl daemon-reload` 3. Run `systemctl start cloud-sql-proxy` -
goodwill revised this gist
Jan 13, 2018 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,9 @@ 1. We assume you already read this: https://cloud.google.com/sql/docs/mysql/connect-external-app#proxy and created a service account for Cloud SQL Client 1. Download cloud_sql_proxy to `/usr/local/bin` 1. Make the following folders, all chown to `root:root` : 1.1. `/var/run/cloud-sql-proxy` 1.1. `/var/local/cloud-sql-proxy` 1.1. Copy downloaded credential json file inside `/var/local/cloud-sql-proxy`, make sure only root can read as it is credential for connection. 1. Copy above gist to `/lib/systemd/system/cloud-sql-proxy.service` 2. Run `systemctl daemon-reload` 3. Run `systemctl start cloud-sql-proxy` -
goodwill revised this gist
Jan 13, 2018 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ 1. Copy above gist to `/lib/systemd/system/cloud-sql-proxy.service` 2. Run `systemctl daemon-reload` 3. Run `systemctl start cloud-sql-proxy` 4. Profit$$$$ -
goodwill revised this gist
Jan 13, 2018 . No changes.There are no files selected for viewing
-
goodwill created this gist
Jan 13, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ [Install] WantedBy=multi-user.target [Unit] Description=Google Cloud Compute Engine SQL Proxy Requires=networking.service After=networking.service [Service] Type=simple WorkingDirectory=/usr/local/bin ExecStart=/usr/local/bin/cloud_sql_proxy -dir=/var/run/cloud-sql-proxy -instances=<instance_connection_name>=tcp:5432 -credential_file=/var/local/cloud_sql_proxy/<credential_json>.json Restart=always StandardOutput=journal User=root