Connection SSL/TLS

I'm trying to introspect my database from planetscale but when I run the command I get an error of:

Ignoring invalid configuration option passed to Connection: ssl{'rejectUnauthorized':true}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
C:\Users\rober\code\projects\drizsup\node_modules\drizzle-kit\index.cjs:35618

Error: unknown error: Code: UNAVAILABLE
server does not allow insecure connections, client must use SSL/TLS.

I got the string from planetscale under node.js connection. I also tried sslaccept=strict.

String here:
DATABASE_URL='mysql://cmbv6127rur27iela7w8:[password]@aws.connect.psdb.cloud/prispractice?ssl={"rejectUnauthorized":true}'

Config file:
import type { Config } from "drizzle-kit";

export default {
schema: "./src/lib/schema.ts",
out: "./src/lib/db",
driver: "mysql2",
dbCredentials: {
connectionString: "mysql://cmbv6127rur27iela7w8:[password]@aws.connect.psdb.cloud/prispractice?ssl{'rejectUnauthorized':true}",
},
} satisfies Config;

What would be the fix?

It would be nice since the error tells you its invalid that it show valid options to choose from.
Was this page helpful?