Last night I was trying to setup a @mail server but the installer kept choking when attempting to connect to my local database.
I am posting here my quick workaround in case you too, dear reader, get a dreaded “PDO” error message complaining about your attempt to “ connect to unix:// “
Here is I how I solved the issue for @mail: I opened library/Zend/Db/Adapter/Pdo/Abstract.php , found the line that creates the PDO object (” new PDO(… “) and, in this example, the first argument passed to the constructor was $dsn.
The problem is that PDO sees that this variables references “ localhost “ and decides that, since the database is local, it is going to use mysql.sock (hence the unix:// scheme)
This works as long as the file is found in its default location. If it is elsewhere, you are out of luck. This happens, for instance, if you use XAMPP.
Here is my quick fix, inserted right before the creation of the PDO object:
$dsn = str_replace('host=localhost', 'unix_socket=/opt/lampp/var/mysql/mysql.sock', $dsn);
Note: I have not investigated enough to know whether this is something missing in the Zend Framework or in @mail itself.