Running on PlanetScale
PlanetScale is a MySQL-compatible serverless database platform powered by Vitess.
Setup
-
Follow Install documentation up to "Configure umami" section.
-
Create a database on PlanetScale called
umami-dband copy theDATABASE_URLstring from "Connect" > "Connect with Prisma" > ".env" tab. -
Add the
DATABASE_URLto your.envfile:DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict -
Run
yarn run build-db && yarn run update-db -
Visit the
umami-dbdashboard and make sure the Tables are created and then promote it to production if you want. -
You should now be able to build and start Umami (
yarn buildfollowed byyarn start). -
Follow the Getting started guide starting from the Login step and be sure to change the default password.
Troubleshooting
If are getting an error like the following example:
PrismaClientInitializationError: Can't reach database server at `host.aws-region.psdb.cloud`:`3306`You can try add a connection timeout query parameter on your DATABASE_URL:
DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict&connect_timeout=300