Hi,
I'm having problem to connect to mysql in one server, i have other aplications working fine

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111).

--in my settings.php

$db_url = 'mysqli://drupal:xxxx@localhost/drupal';

-- using shell no problems

[]$  mysql -u drupal -p drupal
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline 4.3

Thank's

Comments

joshsziegler’s picture

Is your apache installation chrooted? I ran into that problem and it's solved by simply creating a link within that jail.
http://drupal.org/node/29329

michaelrbk’s picture

just to register, the problem was because the port of mysql wan´t the default in this server.

ptam’s picture

mysqli error was: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111).

Same problem

kris-o3’s picture