Split the mysql host into port and hostname in installer before trying to get the IP.
| | |
| | | unset($finished); |
| | | |
| | | // Resolve the IP address of the mysql hostname. |
| | | if(!$conf['mysql']['ip'] = gethostbyname($conf['mysql']['host'])) die('Unable to resolve hostname'.$conf['mysql']['host']); |
| | | $tmp = explode(':',$conf['mysql']['host']); |
| | | if(!$conf['mysql']['ip'] = gethostbyname($tmp[0])) die('Unable to resolve hostname'.$tmp[0]); |
| | | unset($tmp); |
| | | |
| | | |
| | | //** initializing database connection |
| | |
| | | $this->dbmaster->query('FLUSH PRIVILEGES;'); |
| | | |
| | | //* Create the ISPConfig database user in the local database |
| | | $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* " |
| | | /*$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* " |
| | | ."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_host."' " |
| | | ."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';"; |
| | | ."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";*/ |
| | | $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* " |
| | | ."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_ip."' " |
| | | ."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';"; |