Mysql Port

Does anyone know how I can configure CS-Cart to access our database on a different port?



I have tried using “localhost:XXXX” but this does not work and we still get an error connecting to database

[quote name='shervain' timestamp='1409103811' post='190757']

Does anyone know how I can configure CS-Cart to access our database on a different port?



I have tried using “localhost:XXXX” but this does not work and we still get an error connecting to database

[/quote]



We found the following code in the app/Tygh/Backend/Database/Mysqli.php file:



@list($host, $port) = explode(':', $host);
$this->_conn = @ new \mysqli($host, $user, $passwd, $database, $port);




So your solution should work

Just curious, why have a non-standard port for 'localhost'? mySQL should never be publicly exposed on any port for an ecommerce site.

You might be able to use a .my_conf file to the home directory of the user PHP runs as so that when mysql is invoked that it will use that configuration setting. But this could be server/host dependent due to security issues.