Connecting to an existing MySQL DB issues


#1

I’ve understood that introspection is an ongoing development but attempting to use an existing MySQL database via the prisma CLI gives me this error message “Could not connect to database. Connection terminated unexpectedly”.

As a second question, having an existing MySQL db are there any alternatives? I’ve thought about building the data model by hand since I wouldn’t be able to utilize Prisma’s instrospection feature yet, but that wouldn’t matter if I can’t connect to an existing MySQL database at all.

And if there is one, is there an expected release date for those features? Please let me know if I am being unclear! Thanks!


#2

Hi @michael.o.yiu

This looks more like a connector error. Can you try to introspect via prisma introspect -i command ?

You can also track progress for improvements in introspection here: https://github.com/prisma/prisma/issues/4022

But I think your issue is totally unrelated to these right now.

Also, I don’t think there are much more alternatives for MySQL.


#3

I don’t get a MySQL database as an option for the introspect command. I understand that introspect isn’t readily available, but I thought that connecting to an existing MySQL DB would work. Via command line right now, even that is giving me issues.


#4

Oh, totally forgot that MySQL introspection is not available right now:

There is some work need to be done to enable it for MySQL stay tuned.


#5

Ahh, I see. The bit of information that connecting to existing databases requiring introspection is what I needed. Thank you! Do you happen to have a general release date for the feature?


#6

We are currently working on introspection improvements and migration support: https://github.com/prisma/rfcs/pull/7 But I can’t give an ETA