I'm relatively new to Linux, so newbie alert!!
I've installed php5 and phpMyAdmin (MySQL) via synaptics. Both seem to work fine on their own, but when running a php mysql_connect I get a socket error (see below).
I've spent hours forum searching and tried a few things, but no luck.
I have included as much information as think will be relevent.
THE ERROR MESSAGE
mysql_connect($dbhost, $dbuser, $dbpass) causes:
Debug Warning: /var/www/jwgodfrey/include.php line 28 - mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
INSTALLED
Ubuntu 7.10, Php5, PhpMyAdmin, Zend Studios 5.5.0
LOCATION 'php.ini'
/etc/php5/apache2/php.ini
and the socket is left null for default: mysqli.default_socket =
LOCATION 'my.cnf'
/etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
LOCATION 'mysqld.sock'
/var/run/mysqld/mysqld.sock
I also have a mysql.sock broken link:
Location: /var/lib/mysql
Link target: /tmp/mysql.sock