Open P4sca1 opened 2 years ago
This also results in MySQL connections from prisma to be unencrypted by default, because the certificate is not trusted and it then falls back to unencrypted connections.
š we're cleaning up our backlog of issues and are closing everything older than two years. If you still feel that this issue is relevant, please feel free to re-open and our team will take a look. Thank you!
I think this is still relevant @jharrell
Bug description
I am trying to connect to a MySQL database, with a user that has the
REQUIRE SSL
option set.The following error appears:
The MySQL server uses a self-signed certificate.
How to reproduce
You need a MySQL server which allows SSL connections and uses a self-signed certificate. This is the default behaviour in MySQL.
REQUIRE SSL
option for your MySQL user:ALTER USER 'myuser'@'myhost' REQUIRE SSL
Expected behavior
The connection should be successfully established using default options. According to the docs,
sslaccept=accept_invalid_certs
is the default. However, this does not seem to be the case, because the connection does not work. When I manually add?sslaccept=accept_invalid_certs
to the database URL, the connection gets established successfully.Prisma information
Not working database url:
mysql://myuser:mypassword@dbhost:3306/database
Working database url:mysql://myuser:mypassword@dbhost:3306/database?sslaccept=accept_invalid_certs
Environment & setup
Prisma Version