summarylogtreecommitdiffstats
path: root/mysql-socket-php5.3.patch
blob: 814ec7e8b270e740ac1012d46b1451a9ff1dcbe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- 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
--- a/ext/mysqlnd/mysqlnd.c
+++ a/ext/mysqlnd/mysqlnd.c
@@ -958,7 +958,7 @@
 		if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
 			DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
 			if (!socket_or_pipe) {
-				socket_or_pipe = "/tmp/mysql.sock";
+				socket_or_pipe = "/run/mysqld/mysqld.sock";
 			}
 			transport_len = mnd_sprintf(&transport, 0, "unix://%s", socket_or_pipe);
 			unix_socket = TRUE;