Ok, this gives me a warning level
PHP Code:
Severity: Warning
Message: mysql_select_db() expects parameter 2 to be resource, boolean given
Filename: mysql/mysql_driver.php
Line Number: 180
And then fails to select the database
A Database Error Occurred
Unable to select the specified database: db
Looking into the driver it seems that conn_id is not get set to an ID but still false, hence the connection with the socked parameter failed silently (there was no "unable to connect" error).
(When I remove the :/var/run/mysqld/mysqld.sock part from localhost, it works with mysql_driver, but then I still can not specify my sockets)