How do I configure SSL mode without using the connectionString parameter

In drizzle.config.ts I tried pushing to my database but it won't work since it requires a SSL/TLS connection. That would normally be solved using the connectionString, but I got the other parameters and I can't find a way around this. here's my config file:
import type { Config } from 'drizzle-kit';
import 'dotenv/config';

export default {
schema: './app/services/db/schema.server.ts',
driver: 'mysql2',
dbCredentials: {
host: process.env.DATABASE_HOST,
user: process.env.DATABASE_USERNAME,
password: process.env.DATABASE_PASSWORD,
database: process.env.DATABASE_NAME,
},

} satisfies Config;
import type { Config } from 'drizzle-kit';
import 'dotenv/config';

export default {
schema: './app/services/db/schema.server.ts',
driver: 'mysql2',
dbCredentials: {
host: process.env.DATABASE_HOST,
user: process.env.DATABASE_USERNAME,
password: process.env.DATABASE_PASSWORD,
database: process.env.DATABASE_NAME,
},

} satisfies Config;
1 Reply
Ahmed
AhmedOP15mo ago
In my mysql2 connection instance. I use this option
ssl: {
rejectUnauthorized: true,
}
ssl: {
rejectUnauthorized: true,
}
To solve this matter
Want results from more Discord servers?
Add your server