Hi I am migrating my mysql database from windows xp to centos 6. I have the database up and running on the linux. However I cannot connect to it through firefox as I usually do on windows. I am pretty sure that my PHP scripts are OK and this is a configuration issue. Reading the error logs I find that it is trying to connect via /var/lib/mysql/mysql.sock and cannot find it [Thu Jan 26 08:14:19 2017] [error] [client ::1] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/htdocs/HomeLogIn.php on line 87, referer: http://localhost/HomeLogIn.php The correct location is of course /var/run/mysqld/mysql.sock There is obviously a configuration file somewhere that is setting the wrong path info, however I cannot find it. /etc/my.cnf is correct as is /etc/php.ini to the best of my knowledge ------------------------------------------------ my.cnf [client] port=3306 socket = /var/run/mysqld/mysql.sock # SERVER SECTION [mysqld] # The TCP/IP Port the MySQL Server will listen on port=3306 socket = /var/run/mysqld/mysql.sock #Path to the database root datadir="/var/lib/mysql/mysql" -------------------------------- I checked the /etc/httpd content and that seemed OK too. Obviously I am missing one somewhere but where, any thoughts please? I tried restarting Mysql with no effect at all. In fact shutting down the machine and restarting it makes no difference either.