Prisma issue with DEFAULT_DATABASE_NAME 'mysql' on mysql database

INFORMATION
Hello, I have some issue with prisma migration and qovery mysql database (managed)

Relevant information to this issue:

  • OS: Docker container (Node:16)
  • databases: Mysql (managed)
  • Programming language and version: Node:16

Organization ID: c1e8ec98-8460-4bf2-819d-022313b8670b
Project ID: 3d755ac7-898f-4dfa-87e2-85fa661a87d1
Environment ID: f40ad1a0-a059-42a6-a5ab-6ee550900e1f
Service ID: a614dd62-3691-46b8-9c9a-53f01e61d7ea

ISSUE
Hello, I try to deploy mysql (managed) database with a blitz application using prisma and docker. All building work well, but when I want to run migration at the end, the application send me prisma error.

The mysql database is a system database, it should not be altered with prisma migrate. Please connect to another database

After some research, I understood that prisma didn’t like that the database was called ‘mysql’. So I tried to find a way to rename it but I understood that the name of the qovery database was not the real name of the managed database because my qovery name is ‘production-db’ and the DEFAULT_DATABASE_NAME in application env is always ‘mysql’. All mysql databases have a default name ‘mysql’. How can I change my database name from Qovery or from the Qovery shell?

Hello @hcasanov

Indeed, it’s a limitation as of today.

Hopefully, what you can do is to create this RDS sql db directly via a lifecycle job so you can configure as you want.

Here’s the documentation => How To Use Lifecycle Job To Deploy Any Kind Of Resources | Qovery

Let me know if you need any help.

Cheers

Ok perfect ! Thank’s for your help :wink:

Hello, I am having trouble deploying a MySQL database in container mode on Scaleway. I came across this forum thread @bchastanier suggested creating an RDS SQL database directly through a lifecycle job in order to configure it with a custom name. However, I am not entirely sure how to do this.

Alternatively, I am thinking of creating a custom Docker image where the entrypoint.sh script would create the specific database that I need, instead of relying on the default database name ‘mysql’. Would this be a viable solution?

Hi @robsoned ,

Can you please open another thread? Your request does not seem related to this one.