I had the same problem, having 2 DB server running on my machine (mysql & MariaDB).
Considering sock connection is much faster than tcp even if used locally, I made a quick investigation how to use socks.
I found mysqli_connect offer an optional parameter for sock but it can’t be used in any way from core file located in ./include/database/MysqliManager.php
Some other software accept parameter like localhost:/sock/file/location but it doesn’t.
I made a very easy change to core file (I know it shouldn’t be done) but I hope it can be implemented in future release.
Add a parameter to config.php
'db_sock' => '/sock/file/location.sock'
load the optional value in mysqli_connect in ./include/database/MysqliManager.php
$dbsock = isset($configOptions['db_sock']) ? ($configOptions['db_sock'] == '' ? null : $configOptions['db_sock']) : null;
Add $dbsock to mysqli_connect:
$this->database = @mysqli_connect(
$dbhost,
$configOptions['db_user_name'],
$configOptions['db_password'],
isset($configOptions['db_name']) ? $configOptions['db_name'] : '',
$dbport, $dbsock
);
thank you.
my SuiteCrm: 7.11