Author Topic: Cant connect to server trough socket  (Read 5768 times)

0 Members and 1 Guest are viewing this topic.

Euclides

  • Jr. Member
  • **
  • Posts: 2
Cant connect to server trough socket
« on: November 07, 2012, 05:27:25 PM »

Hello guys, I have been trying to install the messenger on one of my servers and I am unable to connect to the database server (I was able to install in  my local machine and in other server), I am receving the following error:

Could not connect, please check server settings in config.php. Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

The server path to socket is actually: /var/run/mysqld/mysqld.sock

I tried to changed value databaseperform.php

From:

in $link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass)
       or show_install_err('Could not connect: ' . mysql_error($link));

to:

':/var/run/mysqld/mysqld.sock' and 'localhost:/var/run/mysqld/mysqld.sock

using these instructions: http://php.net/manual/en/function.mysql-connect.php

with no avail...I musing the following

*  MySQL Database parameters
 */

$mysqlhost = "IP/domain";
$mysqldb = "databasename";
$mysqllogin = "user";
$mysqlpass = "pass";
$mysqlprefix = "";