Merge branch 'dev' into 'dev'
Fix use UNIX socket file to connect DB See merge request hubzilla/core!1587
This commit is contained in:
commit
064f93185c
@ -19,7 +19,7 @@ class dba_pdo extends dba_driver {
|
|||||||
$this->driver_dbtype = $scheme;
|
$this->driver_dbtype = $scheme;
|
||||||
|
|
||||||
if(strpbrk($server,':;')) {
|
if(strpbrk($server,':;')) {
|
||||||
$dsn = $server;
|
$dsn = $this->driver_dbtype . ':unix_socket=' . trim($server, ':;');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dsn = $this->driver_dbtype . ':host=' . $server . (intval($port) ? ';port=' . $port : '');
|
$dsn = $this->driver_dbtype . ':host=' . $server . (intval($port) ? ';port=' . $port : '');
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
// Then set the following for your MySQL installation
|
// Then set the following for your MySQL installation
|
||||||
|
|
||||||
$db_host = 'your.mysqlhost.com'; // Use 'localhost' if you aren't using a remote server
|
$db_host = 'your.mysqlhost.com'; // Use 'localhost' or ':/path/to/socket.file' if you aren't using a remote server
|
||||||
$db_port = 0; // leave 0 for default or set your port
|
$db_port = 0; // leave 0 for default or set your port
|
||||||
$db_user = 'mysqlusername';
|
$db_user = 'mysqlusername';
|
||||||
$db_pass = 'mysqlpassword';
|
$db_pass = 'mysqlpassword';
|
||||||
|
Reference in New Issue
Block a user