Merge pull request #2561 from nzalev/mysql/mariadb-ssl-support

Improved connectionObject creation
This commit is contained in:
Ylian Saint-Hilaire 2021-04-29 22:41:18 -07:00 committed by GitHub
commit da64ad5cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
db.js
View File

@ -443,15 +443,8 @@ module.exports.CreateDB = function (parent, func) {
var dbname = (connectinArgs.database != null) ? connectinArgs.database : 'meshcentral';
// Including the db name in the connection obj will cause a connection failure if it does not exist
var connectionObject = {
'host': connectinArgs.host,
'port': connectinArgs.port,
'user': connectinArgs.user,
'password': connectinArgs.password,
'connectionLimit': null
};
if (connectinArgs.connectionLimit != null) connectionObject.connectionLimit = connectinArgs.connectionLimit;
var connectionObject = Clone(connectinArgs);
delete connectionObject.database;
if (parent.args.mariadb) {
// Use MariaDB