I can not connect to mysql

Website URL

(please specify the URL of the site on which you are experiencing the problem)

Error Message

Fatal error : Uncaught mysqli_sql_exception: Unable to find the socket transport “unix” - did you forget to enable it when you configured PHP? in /home/vol7_4/infinityfree.com/if0_34679847/htdocs/kuran/get_favorites.php:7 Stack trace: #0 /home/vol7_4/infinityfree.com/if0_34679847/htdocs/kuran/get_favorites.php(7): mysqli->__construct(‘localhost’, ‘emr13amiirxyz_k…’, ‘emr13amiirxyz_k…’, ‘emr13amiirxyz_k…’) #1 {main} thrown in /home/vol7_4/infinityfree.com/if0_34679847/htdocs/kuran/get_favorites.php on line 7

Other Information

i can not connect to mysql using mysqli and pdo. chatgpt says find php.ini file an make some changes but i con not find etc/php70/php.ini file, only i can see is htdocs directory.

Hi and welcome to the forum!


what an unnecessary post. it doesn’t solve any problem

It would if you actually read it. You are using localhost, which is incorrect.

The rest of the construct() function looks incorrect as well. Please make sure you are getting the information from the client area / control panel, not just making it up.


sorry, you are right

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.