Hello,
This question was asked many times, but I can't find a good answer. I am getting this error message while trying to connect to MySQL server (PHP + PEAR::DB_DataObject):
"Can't connect to local MySQL server through socket '' (111)"
(notice '' - is that right?)
Does anyone have any ideas about how to get rid of this error?
Configuration: * RedHat Enterprise Linux AS3 * Apache 2.0.46 * PHP 5.0.2 * MySQL 4.1.9, mysqli ext.
Thanks!
[Note: reply-to set to php-db as it's multimailed and I don't see this as a mysql general issue, nor php general, but feh.]
Looks to be set blank/null/etc.
You may be slightly tricked by the existence of both of these - from your standard php.ini...
-----
; Default socket name for local MySQL connects. If empty, uses the built-in
mysql.default_socket =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysqli.default_socket =
-----
I can't see any reason why you wouldn't be able to use the same socket - you're connecting to the same exact server, it's just a path. You should be perfectly able to set your mysqli.default_socket to the same as the mysql.default_socket. I can't tell you what the default for your system is, but there are php functions to get configuration options, if you don't have it in any obvious places.
Cheers,
--
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php