From 82e9b9e7c7ecf1664a7b0d4e57a5c4893739559d Mon Sep 17 00:00:00 2001 From: Michel Kàˆser <mail@michelkaeser.ch> Date: Sat, 16 May 2015 17:44:59 -0400 Subject: [PATCH] define MySQL port by its own (rather than in the host with :port); it's simply cleaner --- install/install.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index 12e0178..8b32027 100644 --- a/install/install.php +++ b/install/install.php @@ -189,6 +189,7 @@ $finished = false; do { $tmp_mysql_server_host = $inst->free_query('MySQL server hostname', $conf['mysql']['host'],'mysql_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL server port', $conf['mysql']['port'],'mysql_port'); $tmp_mysql_server_admin_user = $inst->free_query('MySQL root username', $conf['mysql']['admin_user'],'mysql_root_user'); $tmp_mysql_server_admin_password = $inst->free_query('MySQL root password', $conf['mysql']['admin_password'],'mysql_root_password'); $tmp_mysql_server_database = $inst->free_query('MySQL database to create', $conf['mysql']['database'],'mysql_database'); @@ -202,8 +203,9 @@ } //* Initialize the MySQL server connection - if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { + if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { $conf['mysql']['host'] = $tmp_mysql_server_host; + $conf['mysql']['port'] = $tmp_mysql_server_port; $conf['mysql']['admin_user'] = $tmp_mysql_server_admin_user; $conf['mysql']['admin_password'] = $tmp_mysql_server_admin_password; $conf['mysql']['database'] = $tmp_mysql_server_database; @@ -535,13 +537,15 @@ $finished = false; do { $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); //* Initialize the MySQL server connection - if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { + if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { $conf['mysql']['master_host'] = $tmp_mysql_server_host; + $conf['mysql']['master_port'] = $tmp_mysql_server_port; $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; $conf['mysql']['master_database'] = $tmp_mysql_server_database; -- Gitblit v1.9.1