Can't connect my db to mysql-cpanel
I want to use mysql-cpanel to manage my database of my app in nextjs with prisma (if you have some suggestions, tell me please)
I have this conection string:
I enter this command to make a push of my database in mysql-cpanel:
The provided database string is invalid. invalid port number in database URL.
I created a userdb to my database in mysql Databases and i'm using this user on my conection string.
-
Hey there! I'm not sure if anyone here is going to have much information on this since Prisma doesn't come with cPanel. Maybe another user will share their experience with this tool!
0 -
According to the Prisma documentation, you have missed the username part of the url so it /could/ be misparsing it. The connection string should be in the format mysql://USER:PASSWORD@HOST:PORT/DATABASE - so try:
mysql://user:password@localhost:3306/database
or
mysql://user::password@127.0.0.1:3306/database
Don't try to use the server's actual "hostname" (such as server1.example.com ) as that'll force an external lookup/connection which might be blocked by the server's firewall and will be a bit slower (yes, on the scale of fractions of milliseconds, but sometimes if there is a misconfiguration somewhere on the DNS front it can take several whole seconds).
0
Please sign in to leave a comment.
Comments
2 comments