Connecting PlanetScale Database with MySQL Connector: How to Resolve SSL/TLS Error?

This topic was automatically generated from Slack. You can find the original thread here.

Hi - I thought I’d try to connect a PlanetScale database to my workflow using the MySQL connector. No problem figuring out the connection string details, but once the MySQL credentials are set up, I’m getting “unknown error: Code: UNAVAILABLE server does not allow insecure connections, client must use SSL/TLS”. Is there an additional step I need to do that I’m failing to see?

So I can see that under the hood that this action uses the mysql2 NPM library to connect and execute MySQL statements.

However, I’m not seeing anywhere in the documentation about defining an SSL/TLS connection:

mysql2 documentation: node-mysql2/MySQL-Server.md at master · sidorares/node-mysql2 · GitHub

We may need to add TLS support, you can file a bug report or request additional features for components here: Sign in to GitHub · GitHub

All of our actions and sources are open source as well, so you can also fork our registry and use a different Node MySQL client if you’d like.

Thank you Pierce for looking at this. I’ll file an issue for now. Python is my language of choice so I may have to look at coding something up there. Can action be built in Python like they are in Node as far a creating an abstracted interface?

This content can’t be displayed.

Mario is correct, components like actions and sources are only available in Node.js at this time. You can still make quick code scripts within Python but reusable and publishable actions are only in Node.js.