mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-29 08:43:39 -04:00
Merge pull request #2561 from nzalev/mysql/mariadb-ssl-support
Improved connectionObject creation
This commit is contained in:
commit
da64ad5cb8
11
db.js
11
db.js
@ -443,15 +443,8 @@ module.exports.CreateDB = function (parent, func) {
|
|||||||
var dbname = (connectinArgs.database != null) ? connectinArgs.database : 'meshcentral';
|
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
|
// Including the db name in the connection obj will cause a connection failure if it does not exist
|
||||||
var connectionObject = {
|
var connectionObject = Clone(connectinArgs);
|
||||||
'host': connectinArgs.host,
|
delete connectionObject.database;
|
||||||
'port': connectinArgs.port,
|
|
||||||
'user': connectinArgs.user,
|
|
||||||
'password': connectinArgs.password,
|
|
||||||
'connectionLimit': null
|
|
||||||
};
|
|
||||||
if (connectinArgs.connectionLimit != null) connectionObject.connectionLimit = connectinArgs.connectionLimit;
|
|
||||||
|
|
||||||
|
|
||||||
if (parent.args.mariadb) {
|
if (parent.args.mariadb) {
|
||||||
// Use MariaDB
|
// Use MariaDB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user