blob: 580a535729803a509d3a2af1d79b5d6c019a5262 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index 8897038..6121317 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -554,7 +554,7 @@
if (hostname.l == sizeof("localhost") - 1 && !strncasecmp(hostname.s, "localhost", hostname.l)) {
DBG_INF_FMT("socket=%s", socket_or_pipe->s? socket_or_pipe->s:"n/a");
if (!socket_or_pipe->s) {
- socket_or_pipe->s = "/tmp/mysql.sock";
+ socket_or_pipe->s = "/run/mysqld/mysqld.sock";
socket_or_pipe->l = strlen(socket_or_pipe->s);
}
transport.l = mnd_sprintf(&transport.s, 0, "unix://%s", socket_or_pipe->s);
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index 54e1c93..b355a83 100644
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -51,7 +51,7 @@
# define PDO_MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR
# else
# if !PHP_WIN32
-# define PDO_MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+# define PDO_MYSQL_UNIX_ADDR "/run/mysqld/mysqld.sock"
# else
# define PDO_MYSQL_UNIX_ADDR NULL
# endif
|