This is a rare error that occurs on Solaris, have seen it from Perl, where this line
DBI->connect(...) or die "Unable to connect: $DBI::errstr"
Unable to connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (146) at something.pl line ...
It is very rare for this error to occur. In fact, it usually is promptly and automatically resolved. I don't know whether this is because I am using
mysqld_safe, or not
The global variable
max_connections has been ruled out as a problem. Also, this does not occur on TCP/IP based connections.
Can you enumerate the possible or likely causes of this error happening only occasionally?