|
@@ -74,8 +74,8 @@ global.Core.Setting = {};
|
|
|
if(Config && Config.Database.Mysql.on){
|
|
|
let MysqlPool = require(Core.Path.ExtraLib + '/mysql-pool.js').instance(Config.Database.Mysql);
|
|
|
let testMysqlCon = MysqlPool.getConnection(function(err,connection){
|
|
|
- connection.release();
|
|
|
if(!err){
|
|
|
+ connection.release();
|
|
|
connection.query('SELECT VERSION() as version',function(err,result,fields){
|
|
|
if(err){
|
|
|
LOGGER.error('Mysql Connect error,please recheck your config');
|
|
@@ -87,6 +87,9 @@ if(Config && Config.Database.Mysql.on){
|
|
|
global.MysqlDB = require(Core.Path.Helper + '/mysqldb.js');
|
|
|
}
|
|
|
});
|
|
|
+ }else{
|
|
|
+ LOGGER.error('Mysql Connect error,please recheck your config');
|
|
|
+ LOGGER.error(err);
|
|
|
}
|
|
|
});
|
|
|
|