interrobang Posted February 28, 2014 Share Posted February 28, 2014 Today I had to deploy a site to a server which uses a socket for connecting to mysql. It seems socket support is not handled in WireDatabasePDO. Inserting 2 lines in the WireDatabasePDO::getInstance method fixed it: $host = $config->dbHost; $username = $config->dbUser; $password = $config->dbPass; $name = $config->dbName; $port = $config->dbPort; // get socket from $config: $socket = $config->dbSocket; $dsn = "mysql:dbname=$name;host=$host"; if($port) $dsn .= ";port=$port"; // if socket is provided ignore $host and $port and use $socket instead: if ($socket) $dsn = "mysql:unix_socket=$socket;dbname=$name;"; Link to comment Share on other sites More sharing options...
Soma Posted February 28, 2014 Share Posted February 28, 2014 Opening an issue on github would be better than here. Opening an issue on github would be better than here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now