For those who manually compiled MySQL, the default
mysqlnd settings may results in error.
Your mysql_error() function may give you this message:
---------------------------
No such file or directory (trying to connect via unix:///tmp/mysql.sock)
---------------------------
This is because your manually compiled MySQL has its own place for socket.
You need to provide PHP a reference for an appropriate mysql socket.
That means you need to edit php.ini and add a section like this:
---------------------------
[mysql]
mysql.default_socket="/your/path/to/mysql.sock"
---------------------------| CARVIEW |
Select Language
HTTP/2 301
server: myracloud
date: Fri, 26 Dec 2025 21:51:05 GMT
content-type: text/html
content-length: 161
location: https://www.php.net/mysqlnd
HTTP/2 200
server: myracloud
date: Fri, 26 Dec 2025 21:51:06 GMT
content-type: text/html; charset=utf-8
content-language: en
permissions-policy: interest-cohort=()
x-frame-options: SAMEORIGIN
status: 200 OK
link: ; rel=shorturl
last-modified: Fri, 26 Dec 2025 20:08:13 GMT
vary: accept-encoding
content-encoding: gzip
expires: Fri, 26 Dec 2025 21:51:06 GMT
cache-control: max-age=0
PHP: Mysqlnd - Manual
update page now
MySQL Native Driver
+add a note
User Contributed Notes 1 note
koalay at gmail dot com ¶
16 years ago
↑ and ↓ to navigate •
Enter to select •
Esc to close • / to open
Press Enter without
selection to search using Google