Skip to content

Unable to connect to mysql using ssl #142

@z88kat

Description

@z88kat

I have tried the following configuration but i am unable to connect to mysql 8 database. Either with the certificate or without by using rejectUnauthorized.

I always receive the error

Error: Connections using insecure transport are prohibited while --require_secure_transport=ON

let mySQLOptions = {
    host: process.env.MYSQL_SERVER,
    port: 3306,
    user: process.env.MYSQL_USER,
    password: process.env.MYSQL_PASSWORD,
    ssl: {
        // TODO: set up your ca correctly to trust the connection
        ca: fs.readFileSync("./config/ssl/RootCA.crt.pem"),
        rejectUnauthorized: false
    }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions