MySql mysql.sock not in default location. Help????

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
Zedic
Posts: 2
Joined: Wed 3. May 2006, 17:46

MySql mysql.sock not in default location. Help????

Post by Zedic »

My webhost put mysql.sock in different location. It is not in /tmp/mysql.sock They put it under /mysql/mysql.sock

Where do I change this?

Here is the error i'm getting.

Code: Select all

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /var/www/html/portal/setup/setup.php on line 53

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/html/portal/setup/setup.php on line 57
For example in the PHPMyAdmin config.inc.php file there is a config entry for the path to the socket file so I just changed it.

Is there such a config option in phpwcms?

-----------------
Apache 1.3.27
php 5.1.3-dev
MySQL 4.1.9
-----------------
Zedic
Posts: 2
Joined: Wed 3. May 2006, 17:46

Fixed mysql.sock problem.

Post by Zedic »

Okay, I fixed my own problem by setting the default path to the mysql.sock file in my php.ini file.

Code: Select all

php.ini
mysql.default_socket=/path/to/mysql.sock
:idea: But what if you are using more than one database and don't want to use the default php.ini setting? This should also be handeled in the phpwcms config file *in my humble opinion*. :idea:

Hope this helps someone else.
Post Reply