Skip to content
Merged
6 changes: 6 additions & 0 deletions lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ private function avoidReusingParentProcessConnection()
$this->parentConnections[] = $this->_connection;
$this->_connection = null;
$this->pid = getmypid();

// Reset config host to avoid issue with multiple connections
if (!empty($this->_config['port']) && strpos($this->_config['host'], ':') === false) {
$this->_config['host'] = implode(':', [$this->_config['host'], $this->_config['port']]);
unset($this->_config['port']);
}
}
}

Expand Down