From 9efd8e06dc23bda7102058e4a1f29bb72f8335ab Mon Sep 17 00:00:00 2001 From: Joe Huss Date: Thu, 25 Jun 2015 07:48:26 -0400 Subject: [PATCH] Contribution Type: improvement / new feature Primary Area: plugins Description of change: Implemented using the same changes mentioned here: https://www.phptesting.org/forums/topic/5-mysql-plugin-setup/ Allows you to specify a hostname for your mysql connection. Not my original code just patching it into the current source and made a branchs/push for it. (i.e. Created a new plugin named ToolX, used library X to implement, see link) --- PHPCI/Plugin/Mysql.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PHPCI/Plugin/Mysql.php b/PHPCI/Plugin/Mysql.php index 5c36a09f..fdb521ef 100644 --- a/PHPCI/Plugin/Mysql.php +++ b/PHPCI/Plugin/Mysql.php @@ -166,10 +166,11 @@ class Mysql implements \PHPCI\Plugin $args = array( ':import_file' => escapeshellarg($import_file), ':decomp_cmd' => $decomp_cmd, + ':host' => escapeshellarg($this->host), ':user' => escapeshellarg($this->user), ':pass' => escapeshellarg($this->pass), ':database' => ($database === null)? '': escapeshellarg($database), ); - return strtr('cat :import_file :decomp_cmd | mysql -u:user -p:pass :database', $args); + return strtr('cat :import_file :decomp_cmd | mysql -h:host -u:user -p:pass :database', $args); } }