PlanetScale
🪐
PlanetRock
PlanetScale offers a scalable, serverless MySQL-compatible database. It is built on Vitess, the database clustering system used by YouTube.
Configuration
Since PlanetScale is MySQL compatible, you can use it with standard PHP MySQL drivers (PDO, mysqli) and frameworks like Laravel or Symfony without special adapters.
CA Certificate
PlanetScale requires a secure connection using a CA certificate. You need to download the CA certificate and make it available to your application.
- Download the CA certificate from PlanetScale documentation.
- Add it to your repository (e.g.,
config/cacert.pem). - Reference it in your database configuration options.
Laravel example
In your config/database.php:
'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), // ... 'options' => [ PDO::MYSQL_ATTR_SSL_CA => base_path('config/cacert.pem'), ], ],php
Region
Select a matching region when creating a PlanetScale database to ensure low data latency with fortrabbit.