Skip to content

Providing SSL information for MySQL conections #5350

@mikesol

Description

@mikesol

My etherpad instance uses PlanetScale as a MySQL backend and, to connect, it needs SSL information.

I edited DB.js like so and it works:

const tls = require('tls');
var realSettings = Object.assign(
	{ ssl: { ca: tls.rootCertificates } },
	settings.dbSettings
);

// set database settings
const db = new ueberDB.Database(
	settings.dbType,
	realSettings,
	null,
	log4js.getLogger("ueberDB")
);

I'm wondering if this is useful enough to propose as a PR? Maybe by gating it with a setting like useTSLRootCerts or something similar?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions