diff --git a/config/resources.ini.in b/config/resources.ini.in old mode 100644 new mode 100755 index 5cf86e817..aca3a227a --- a/config/resources.ini.in +++ b/config/resources.ini.in @@ -17,6 +17,7 @@ type = db db = @internal_db_type@ host = @internal_db_host@ +port = @internal_db_port@ password = @internal_db_pass@ username = @internal_db_user@ dbname = @internal_db_name@ @@ -25,7 +26,7 @@ dbname = @internal_db_name@ type = db db = @ido_db_type@ host = @ido_host@ +port = @ido_port@ password = @ido_user@ username = @ido_user@ -port = @ido_port@ dbname = @ido_database@ diff --git a/library/Icinga/Application/DbAdapterFactory.php b/library/Icinga/Application/DbAdapterFactory.php index 92604f5ce..56ea4afd3 100644 --- a/library/Icinga/Application/DbAdapterFactory.php +++ b/library/Icinga/Application/DbAdapterFactory.php @@ -219,8 +219,10 @@ class DbAdapterFactory implements ConfigAwareFactory ); switch ($config->db) { case 'mysql': + $options['port'] = $config->get('port', 3306); return self::callFactory('Pdo_Mysql', $options); case 'pgsql': + $options['port'] = $config->get('port', 5432); return self::callFactory('Pdo_Pgsql', $options); default: if (!$config->db) {