actually apply mariadb credentials
This commit is contained in:
parent
5fe415dfcf
commit
1756b1780a
@ -11,6 +11,8 @@ class MariaDB {
|
||||
if (!config) Util.fatal(new Error('No config options provided!'));
|
||||
|
||||
this.config = config;
|
||||
const { MARIA_HOST: host, MARIA_USER: user, MARIA_PORT: port, MARIA_PASS: password, MARIA_DB: database } = config;
|
||||
this._credentials = { host, user, port, password, database };
|
||||
|
||||
this.pool = null;
|
||||
this.ready = false;
|
||||
@ -26,7 +28,7 @@ class MariaDB {
|
||||
init () {
|
||||
|
||||
this.logger.status(`Creating connection pool`);
|
||||
this.pool = mysql.createPool(this.config.options.client);
|
||||
this.pool = mysql.createPool({ ...this.config.options.client, ...this._credentials });
|
||||
|
||||
this.pool.on('connection', (connection) => {
|
||||
this.logger.debug(`New connection: ${connection?.threadId || null}`);
|
||||
|
Loading…
Reference in New Issue
Block a user