How to add a MySQL Planetscale database as a grafana cloud datasource

May 19, 2023

The grafana cloud free plan is amazing for most of personal projects! I use it a lot on, and recently I wanted to display some data from my platnetscale mysql database to visualise the user growth. Platnetscale free plan being amazing as well, I highly advise the platform (

First you need to add a new datasource, in our case: mysql.

Then head over to Planetscale, and create a new password with read-only rights.

This part is important, as from grafana you can run DROP commands.

Then in the datasource add the host, user, password. As Planetscale is using SSL, make sure to toggle "With CA cert" option.

In authentication details, you need to provide the TLS/SSL root certificate. Here is how to obtain it:

# if you have pbcopy on mac:
curl | pbcopy

# otherwise, copy paste what you get from the curl command

How it should look like:


And here you are! All good to build beautiful dashboards for free ✨