From efb9d30de01ed11f17ec430545de7eef7b9b65ab Mon Sep 17 00:00:00 2001 From: Adam Lavin Date: Sat, 14 Feb 2015 22:20:26 +0000 Subject: [PATCH] Added in ability to change mysql port --- config.template.yaml | 1 + lib/config.js | 3 ++- lib/database.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.template.yaml b/config.template.yaml index 0b3855de..53084d34 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -5,6 +5,7 @@ # password: password for user mysql: server: 'localhost' + port: 3306 database: 'cytube3' user: 'cytube3' password: '' diff --git a/lib/config.js b/lib/config.js index bb13290e..6f942258 100644 --- a/lib/config.js +++ b/lib/config.js @@ -8,9 +8,10 @@ var YAML = require("yamljs"); var defaults = { mysql: { server: "localhost", + port: 3306, database: "cytube3", user: "cytube3", - password: "" + password: "", }, listen: [ { diff --git a/lib/database.js b/lib/database.js index ac4e0678..f71386fd 100644 --- a/lib/database.js +++ b/lib/database.js @@ -14,6 +14,7 @@ var global_ipbans = {}; module.exports.init = function () { pool = mysql.createPool({ host: Config.get("mysql.server"), + port: Config.get("mysql.port"), user: Config.get("mysql.user"), password: Config.get("mysql.password"), database: Config.get("mysql.database"),