I'm having a problem with accessing to MySQL via PHP.
The problem is that PHP ties to find MySQL socket in /tmp/mysql.sock.
PHP returns "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ".
But actual socket is in /var/lib/mysql/mysql.sock.
This is configured on my.cnf (socket = /var/lib/mysql/mysql.sock -> mysqld & client) and php.ini as well (mysql.default_socket = /var/lib/mysql/mysql.sock).
But phpinfo() returns:
Configuration File (php.ini) Path /usr/local/lib
My php.ini located in /etc/php.ini
How do I solve this problem?
Please someone advise.