diff --git a/lib/mysql.js b/lib/mysql.js index 32b6f99..f72c72c 100644 --- a/lib/mysql.js +++ b/lib/mysql.js @@ -54,6 +54,14 @@ exports.initialize = function initializeDataSource(dataSource, callback) { options.database = s.database; } + // Take other options for mysql driver + // See https://github.com/strongloop/loopback-connector-mysql/issues/46 + for (var p in s) { + if (options[p] === undefined) { + options[p] = s[p]; + } + } + dataSource.client = mysql.createPool(options); dataSource.client.on('error', function (err) {