summaryrefslogtreecommitdiffstats
path: root/Applications/phpmyadmin/config.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/phpmyadmin/config.inc.php')
-rw-r--r--Applications/phpmyadmin/config.inc.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php
index 46d5e70..1f1288b 100644
--- a/Applications/phpmyadmin/config.inc.php
+++ b/Applications/phpmyadmin/config.inc.php
@@ -59,6 +59,34 @@ if(getenv('DB_SERVICE_USER') != '') {
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
}
+elseif(getenv('DB_SERVICE_HOST') != '') {
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = getenv('DB_SERVICE_HOST');
+ if (getenv('DB_SERVICE_PORT'))
+ $cfg['Servers'][$i]['port'] = getenv('DB_SERVICE_PORT');
+ else
+ $cfg['Servers'][$i]['port'] = 3306;
+
+ if (getenv('DB_SERVICE_CONTROL_USER')) {
+ $cfg['Servers'][$i]['controluser'] = getenv('DB_SERVICE_CONTROL_USER');
+ $cfg['Servers'][$i]['controlpass'] = getenv('DB_SERVICE_CONTROL_PASSWORD');
+ }
+}
+
+if(getenv('DB_EXTRA_HOSTS') != '') {
+ $list = explode(",", getenv('DB_EXTRA_HOSTS'));
+ foreach ($list as $item) {
+ $pair = explode(":", $item);
+ if (!$pair[1]) $pair[1] = 3306;
+
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = $pair[0];
+ $cfg['Servers'][$i]['port'] = $pair[1];
+ }
+}
+
/**
* phpMyAdmin configuration storage settings.
*/