3lade Posted February 20, 2003 Report Share Posted February 20, 2003 I have been messing about with this and trying to get a local intranet running at work. I have set up a dummy machine at home to configure and test then migrate all settings and files into work. My machine at home works fine, but this one dont :( I have installed all the same mods and rpms, apache runs fine it looks to be parsing php files but I cant connect to the mysql server. I get the message: "Cant connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)" I have searched and found the file mysql.sock and that is in /var/tmp/ how do I get it to know where it is? phpMyAdmin shows the same message but webmin connects fine, I can also connect from other XP machines to the server so whats happening? Quote Link to comment Share on other sites More sharing options...
3lade Posted February 20, 2003 Author Report Share Posted February 20, 2003 I have managed to find a temp fix to the problem. Start mysql server and wait for the mysql.sock file to appear in tmp dir, then I just put a link in the /var/lib/mysql/ dir to the first file. It appears to be working, but for how long! Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted February 20, 2003 Report Share Posted February 20, 2003 Check this out.. They mention your fix, but state there is permissions issues. http://lists.dajoba.com/p/mysqltool/2002-S...ber/000261.html Also, if you search google groups (usenet), there is a ton of references to the problem. I did a search with mysql.sock "local MySQL server through socket" Let us know how you make out.. Quote Link to comment Share on other sites More sharing options...
3lade Posted February 20, 2003 Author Report Share Posted February 20, 2003 I had a quick look through and they all seem beyond my experience at the moment. But the symlink option is the quick fix and it has been working all afternoon with multiple users editing and using the databases. I think I will leave it in place for the time being and work on it at a later date. :wink: Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 20, 2003 Report Share Posted February 20, 2003 Hi The problem is that MySQL is not getting started at boot. You can't connect because the database isn't running. When you start the database you can connect. Quote Link to comment Share on other sites More sharing options...
paul Posted February 20, 2003 Report Share Posted February 20, 2003 johnnyv is roght the solution: from a command line chkconfig --add mysql Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted February 21, 2003 Report Share Posted February 21, 2003 I thought mysql.sock isn't created until after mysql is running? Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 21, 2003 Report Share Posted February 21, 2003 I thought mysql.sock isn't created until after mysql is running? You are correct. Thats why the script couldn't connect as mysql.sock didn't exist as mysql was not running. I am intimately familiar with the problem as i use mysql & php, but i don't start mysql at boot on my work station, only when i start working on scripts. Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted February 21, 2003 Report Share Posted February 21, 2003 So his problem is not the mysql.sock can't be found, its that he hasn't started mysql period.. OIC, so the apache/php script tries to connect and the resulting message can't find mysql.sock. This is the same problem I have had. Let's see if I can fix it now :) Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted February 21, 2003 Report Share Posted February 21, 2003 attempting to run mysql gets the following message: Can't connect to local MYSQL server through socket '/var/lib/mysql/mysql.sock' When i try chkconfig --add mysql it states "service mysql does not support chkconfig".. I managed to get this working before hmmmm what did I do? Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted February 21, 2003 Report Share Posted February 21, 2003 Fixed it.. I uninstalled mysql, reinstalled it with urpmi and after reboot it works. My problems all started when I used webmin to turn off some startup services and then decided to start using mysql again... whatever, time for 9.1 anyways :) Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 21, 2003 Report Share Posted February 21, 2003 Fixed it.. I uninstalled mysql, reinstalled it with urpmi and after reboot it works. My problems all started when I used webmin to turn off some startup services and then decided to start using mysql again... whatever, time for 9.1 anyways :) Oh well :) And yeah i will install 9.1rc1 on my second computer tonight. Quote Link to comment Share on other sites More sharing options...
paul Posted February 22, 2003 Report Share Posted February 22, 2003 Fixed it.. I uninstalled mysql, reinstalled it with urpmi and after reboot it works. My problems all started when I used webmin to turn off some startup services and then decided to start using mysql again... whatever, time for 9.1 anyways :) Oh well :) And yeah i will install 9.1rc1 on my second computer tonight. so whats it like then???? Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 22, 2003 Report Share Posted February 22, 2003 Fixed it.. I uninstalled mysql, reinstalled it with urpmi and after reboot it works. My problems all started when I used webmin to turn off some startup services and then decided to start using mysql again... whatever, time for 9.1 anyways :) Oh well :) And yeah i will install 9.1rc1 on my second computer tonight. so whats it like then???? Nice look, kde 3.1 is faster/more responsive than 3.0 Default fonts better IMO. It should be very good when the bugs are ironed out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.