Commit 6cdf0c87 authored by wanjilong's avatar wanjilong

add: 增加ini文件获取的兼容

parent 9dffcd9a
......@@ -259,6 +259,14 @@ abstract class MysqlClusterBase
*/
private static function getDbServerPort($type, $dbShardingIndex)
{
if(empty(self::$iniConf)) {
//重新加载 ini
self::$iniConf = config('mysql', static::CONFIG_INDEX);
if (!self::$iniConf) {
throw new \Exception('mysql yaconf ini config not exist');
}
}
$server = '';
$port = 0;
$host = self::$iniConf[$type]['host'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment