The following command is executed successfully.
The same script when accessing the WEB server on Apache 2.2.x (PHP 5.3 Lib64) says that it is impossible to connect via a MySQL socket. PHP in Apache works, as
phpinfo() outputs the necessary information.
It is guaranteed from the command line, as the contents of the tables are displayed. I checked the rights to the socket - everything is normal. Why is that?