PlanetScale is a MySQL-compatible serverless database platform powered by Vitess.
Follow Install documentation up to "Configure umami" section.
Create a database on PlanetScale called umami-db
and copy the DATABASE_URL
string from "Connect" > "Connect with Prisma" > ".env" tab.
Add the DATABASE_URL
to your .env
file:
DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict
Run yarn run build-db && yarn run update-db
Visit the umami-db
dashboard 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 build
followed by yarn start
).
Follow the Getting started guide starting from the Login step and be sure to change the default password.
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