By Rajkishore J
Cloud Support Engineer
Hello, I want to connect Postgres managed database to google data studio but I get an error while trying to establish a connection.
any guidance will be helpful.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi
Please follow the below steps to connect Postgres Managed database as the data source for google data studio
https://docs.digitalocean.com/products/databases/postgresql/how-to/connect/
https://support.google.com/a/answer/6342198?hl=en
Make sure you have OpenSSL installed on your operating system. OpenSSL will be used to generate client-side public/private key pairs.
openssl genrsa -out rsaprivkey.pem 2048
openssl rsa -in rsaprivkey.pem -pubout -outform DER -out rsapubkey.der
openssl pkcs8 -topk8 -inform PEM -outform DER -in rsaprivkey.pem -out rsaprivkey.der -nocrypt
Select “Data Sources” on the left followed by the blue (+) on the bottom right corner to add a new data source. Please follow the next set of prompts to agree to google terms and conditions.
Select “PostgreSQL” as the data source type on the left and proceed to “Authenticate” DigitalOcean PostgreSQL. Follow the next set of steps to authenticate with your Google account.
Under the “Basic” settings, input the values for host, port, database, username, and password. (Note: these values can be obtained from the DigitalOcean console)
Remember to enable SSL for over-the-wire encryption of data and enter the cert and key files.
Finally, click “Authenticate” to authenticate with the DO PostgreSQL database server.
After authentication with the database, you can proceed to query data from it
I hope this helps!
Regards, Rajkishore
For MySQL, refer to the below link :
Will suggest trying without “Enable SSL”.
Regards, Rajkishore
Hi All,
Note: the private key should be in PKCS8 format, so if you have supplied rsaprivkey.pem; you will get the below error.
“Please make sure that the private key is in PKCS8 format. Error ID: 8dc032ae”
Add PostgreSQL SSL Client Configuration Files as below :
Server certificate: ca-certificate.crt
Client certificate: rsapubkey.der
Client private key: rsaprivkey.der
I hope this helps!!
Regards, Rajkishore
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.