Connect any MySQL client to PlanetScale using Connection Strings
Today, we are excited to share that connection strings are available to all PlanetScale users.
As a company that obsesses over making databases more accessible to developers, you might have struggled with why PlanetScale didn’t have a way to connect to your database with connection strings. And we heard you! You can now use the tools you're familiar with to connect to PlanetScale databases, whether that’s with Rails, Python, Prisma, Laravel, or any other MySQL client. Connection strings also enable you to connect to other serverless computing platforms like AWS Lambda or Vercel.
Within PlanetScale, you can generate a new password and automatically get client code for many popular frameworks and languages for you to connect your PlanetScale database.
Strong passwords, never stored in plain text#
PlanetScale connection strings are built with security as a priority, so you can spend less time worrying if your database connections are secure. PlanetScale Passwords are created for use with a single database branch. This strong security model allows you to generate passwords tied to a branch, which prevents accessing the data or schema on the given branch from another branch. PlanetScale also only stores hashes and metadata about your database passwords. We do not store any passwords in plain text to add an extra layer of security to your database.
GitHub Secret Scanning out of the box#
Leaked secrets happen. We’ve all been there. If one of your PlanetScale Passwords or service tokens are committed in plain text to a public GitHub repository or private repositories owned by organizations where GitHub Advanced Security is enabled, through the GitHub Secret Scanning program we will automatically take corrective action to delete the access tokens and shut down all access from them.
Built for serverless scale#
Connection Strings now enable you to connect your serverless functions with PlanetScale databases on serverless platforms such as AWS Lambda and Vercel Serverless Functions. No need to worry about managing your connection count. PlanetScale can handle tens of thousands of simultaneous database connections. Scaling with you as your serverless application grows.
Native MySQL authentication support#
PlanetScale supports both MySQL native authentication, which is widely used to provide a secure connection to MySQL servers, and MySQL Caching SHA-2 authentication, which is the most secure authentication mechanism to connect to MySQL. Based on your application needs and platform support, you can switch between the authentication modes with the same password.
You can read more about connecting securely to PlanetScale here.
Try it out#
If you haven’t already done so, create a new database in PlanetScale and try connecting with a connection string by generating a new password today. Give it a try and let us know what you think.