Working with PDO Class I've got a problem with a PHP socket connection.
After searching, I looked at this link and couldn't find any appropriate answer for me.
I using macOS Sierra Version 10.12.6
I tried to get some information from mysql> show variables like '%sock%'
but didn't get any result from mysql shell. I logged successfully.
Don't have any my.cnf
file in my /etc
folder.
This is the result I got from php -i | grep pdo
:
pdo_mysql.default_socket => /var/mysql/mysql.sock => /var/mysql/mysql.sock
I am not using Laravel.
I changed configuration in my php.ini
file to pdo_mysql.default_socket=/var/mysql/mysql.sock
, but it still does not work.
How can I connect PHP and MySQL working properly on same socket connection?