From b1b96e20a938c00084da1bdf17edf16f6076b666 Mon Sep 17 00:00:00 2001 From: Hidde Boomsma Date: Tue, 8 May 2018 07:49:32 +0200 Subject: [PATCH] add password for gitlab and correct hostname to host param --- src/MysqlPersistentConnection.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MysqlPersistentConnection.php b/src/MysqlPersistentConnection.php index adb09fb..a2daa37 100644 --- a/src/MysqlPersistentConnection.php +++ b/src/MysqlPersistentConnection.php @@ -115,9 +115,10 @@ public function getConnectionUrl(): string } return sprintf( - 'mysql://%s@%s:%s/%s?server_version=%s', + 'mysql://%s:%s@%s:%s/%s?server_version=%s', $this->connection_params['user'] ?? get_current_user(), - $this->connection_params['hostname'] ?? 'localhost', + $this->connection_params['password'] ?? '', + $this->connection_params['host'] ?? 'localhost', $this->connection_params['port'] ?? 3306, $this->connection_params['dbname'] ?? 'test', $this->connection_params['server_version'] ?? '5.6'