Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: 1.0.1
-
Fix Version/s: None
-
Component/s: Zend_Db
-
Labels:None
-
Fix Version Priority:Should Have
Description
There is currently no way to specify the unix_socket option for the PDO_MYSQL DSN.
See http://www.php.net/manual/en/ref.pdo-mysql.connection.php
The desired usage is:
$driver_options = array('unix_socket' => '/path/to/mysql.sock');
$params = array('driver_options' => $driver_options, ...other options...);
$db = Zend_Db::factory('pdo_mysql', $params);
The MySQLI extension doesn't need any change, because the socket location is specified in a php.ini configuration.
this already works, but you specify it in the options, not the driver_options...
$options = array( 'host' => 'localhost', 'username' => 'user', 'password' => '****', 'dbname' => 'db', 'unix_socket' => '/tmp/mysql5.sock' ); $db = Zend_Db::factory('Pdo_Mysql', $options);$options = array( 'host' => 'localhost', 'username' => 'user', 'password' => '****', 'dbname' => 'db', 'unix_socket' => '/tmp/mysql5.sock' ); $db = Zend_Db::factory('Pdo_Mysql', $options);