|
|
@@ -147,8 +147,13 @@ class Mysql extends DboSource {
|
|
|
if (!empty($config['encoding'])) {
|
|
|
$flags[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $config['encoding'];
|
|
|
}
|
|
|
+ if (empty($config['unix_socket'])) {
|
|
|
+ $dsn = "mysql:host={$config['host']};port={$config['port']};dbname={$config['database']}";
|
|
|
+ } else {
|
|
|
+ $dsn = "mysql:unix_socket={$config['unix_socket']};dbname={$config['database']}";
|
|
|
+ }
|
|
|
$this->_connection = new PDO(
|
|
|
- "mysql:host={$config['host']};port={$config['port']};dbname={$config['database']}",
|
|
|
+ $dsn,
|
|
|
$config['login'],
|
|
|
$config['password'],
|
|
|
$flags
|