Guest Posted March 8, 2004 Share Posted March 8, 2004 Hi, When I try to view my site I get this error. Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/catalog/includes/functions/database.php on line 17Unable to connect to database server! My site was working a couple of days ago and I have not added or changed anything. Line 17 on database.php is this: $$link = mysql_pconnect($server, $username, $password); Anyone have any sugesstions of what I am doing wrong? Cheers Lee Link to comment Share on other sites More sharing options...
♥yesudo Posted March 8, 2004 Share Posted March 8, 2004 have you checked with your host that the server is working okay ? Your online success is Paramount. Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2004 Share Posted March 8, 2004 No they say nothing has changed and mysql is running correctly. Any other ideas? Cheers Lee Link to comment Share on other sites More sharing options...
SunYe Posted March 8, 2004 Share Posted March 8, 2004 I think that's a mysql server problem. The fast way is restart mysql server. Or you can try restart the web server and reconnect the database. ;) good luck. Fan of OSC system................. Comming From China............. Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2004 Share Posted March 8, 2004 how would i do this? Link to comment Share on other sites More sharing options...
SunYe Posted March 8, 2004 Share Posted March 8, 2004 how would i do this? Restart the Mysql server: In unix os, you can kill the process of mysql and restart it. In win os, you can stop the server and restart the mysql server from service manager. Restart the web server: If you are using apache, can run the apachectl command. type apachectl restart.That's it. Fan of OSC system................. Comming From China............. Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2004 Share Posted March 8, 2004 I doubt my hosting company will do that. It weird the site was working last time I checked and no one has viewed it or used it since I can't see where the proble has come from. Link to comment Share on other sites More sharing options...
OceanRanch Posted March 8, 2004 Share Posted March 8, 2004 Hi Lee, You are running with pesrsistent connections set to true. (see mysql_pconnect rather than mysql_connect). Normally this would not be a problem. You might want to try setting it to false by changing both catalog/includes/configure.php and admin/includes/configure.php at or near the end of each file. define('USE_PCONNECT', 'false'); // use persistent connections? HTH Tom Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2004 Share Posted March 8, 2004 The problem has seems to have sorted itself out without me doing anything. A server glitch maybe? Thanks for all the help anyway, Cheers Lee Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2004 Share Posted March 23, 2004 I am getting this problem again yet I have not done any work on the site in months? I have tried turning off non persistant connections but has no effect. Can anyone offer any advice on this as I cant see what the problem is. Lee Link to comment Share on other sites More sharing options...
phethean Posted April 15, 2004 Share Posted April 15, 2004 I am having the same issue. Have you found a solution? Anyone? Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2004 Share Posted April 15, 2004 if you have access to your server error and log files, you can see what may be going on there, then ask your host to 'reboot' the server, which kills all processes and reloads upon bootup. if on a 'virtual server' the reboot takes about 5 seconds, a 'restart' takes 1 second but does not kill all processes. if it continues, time to move servers. Link to comment Share on other sites More sharing options...
phethean Posted April 15, 2004 Share Posted April 15, 2004 just manually killed all precesses through phpmyadmin. will see if it comes up again. i will mess with the pconnect settings too. i'll let you know what happens. thx. Link to comment Share on other sites More sharing options...
♥Vger Posted April 15, 2004 Share Posted April 15, 2004 If the problem does resurface here are two things you can check - in your config files. If it says this define('DB_SERVER', 'localhost') change it to this define('DB_SERVER', '127.0.0.1') and if it says this define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' change it to this define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' Your hosting provider may have upgraded something without the 'support staff' knowing. Most support staff are working from a list of known problems on a computer screen and actually know no more than what they can read! Hope this helps - Vger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.