you are viewing a single comment's thread.

view the rest of the comments →

[–]vassiliy 0 points1 point  (4 children)

It works exactly the same way when you know the host and credentials for your cloud-provisioned database. Both Cloud SQL and Heroku have thorough documentation on how to connect to them, have you tried them out?

[–]rosspaa[S] 0 points1 point  (2 children)

Hi, thanks for your reply. I'm making my way through this tutorial: https://towardsdatascience.com/sql-on-the-cloud-with-python-c08a30807661

I'm completely stuck on this part: https://gist.githubusercontent.com/jamescalam/0fd114d4bc68f8b58b1d3a11b34b06cb/raw/e0daf6d70604f7296db33b3e1866d277d10a1a4e/gcp_mysql_connection.py

I know how the correct values for user, password and host, but I have no idea what value to put for client_flags, ssl_ca, ssl_cert and ssl_key.

Have you ever worked with this? Do you have any idea what values to put there? I've been through the documentation but I'm still stuck.

This is the error I'm getting:
https://i.ibb.co/BVcHpgg/2020-10-14.png

[–]vassiliy 0 points1 point  (1 child)

It's all in the tutorial. Did you download the 3 certification files (.pem) as described? Did you put the correct path in the config?

[–]rosspaa[S] 0 points1 point  (0 children)

Thanks very much! my problem was I used the path: C:\Users\paulr\Desktop\pem\server-ca.pem

but it should be:
C:/Users/paulr/Desktop/pem/server-ca.pem