cuboctahedron Posted April 25, 2003 Report Share Posted April 25, 2003 Hi, I tried to look everywhere for this problem for over a week but I guess I should have visited the mandrake forum earlier, anyhow. I installed Mandrake 9.1, and everything works fine, except mysql I can run webadmin, php pages, Apache etc, except php pages that interact with mysql. When I call a php page with mysql I get an error saying:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) I uninstalled, and reinstalled the packages but that didnt work. When I type >"start mysql" I get the same message. However, when I type "service mysql start" it says started [ok], but mysql didnt start at all when I checked to see by typing:" ps -e | grep mysql". Also when I type service mysql status I see: mysqld is stopped mysqld-max is stopped There is a mysql.sock file located, both at /var/lib/mysql/ and /tmp (just to make sure)/ I dont know where to look next; Help very appreciated greetings Patrick Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted April 25, 2003 Report Share Posted April 25, 2003 I had this problem too. In my case, I did uninstall mysql and reinstall and it solved the problem. On my system I have libmysql12-4.0.11a-5mdk php-mysql-4.3.0-2mdk installed.. Quote Link to comment Share on other sites More sharing options...
cuboctahedron Posted April 26, 2003 Author Report Share Posted April 26, 2003 I tried that. I was wondering; It seems I have both mysql and mysql-max, since when I type 'service mysql status' I see: mysqld is stopped mysqld-max is stopped Does this matter? Quote Link to comment Share on other sites More sharing options...
Guest Linz Posted April 28, 2003 Report Share Posted April 28, 2003 MySQL works great here. The packages I have is: libmysql12-4.0.11a-5mdk MySQL-4.0.11a-5mdk MySQL-client-4.0.11a-5mdk MySQL-common-4.0.11a-5mdk php-mysql-4.3.0-2mdk Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted April 28, 2003 Report Share Posted April 28, 2003 From http://www.shannonbrown.net/resources/linu...x-resources.htm : The error is caused by an incorrectly set permission on the sockets directory -- this appears to occur if you installed MySQL using RPMs.To fix the problem:Login as root. Identify the location of the Unix Sockets file associated with the MySQL installation. My Unix Sockets file was located at /var/lib/mysql/mysql.sock. Execute the change directory command to the directory ABOVE the mysql directory that holds the socket file. In my example, I execute cd /var/lib -- my full path to the socket file is /var/lib/mysql/mysql.sock, and I need to lop off the mysql directory and the socket file name (mysql.sock). When in /var/lib excute this command chmod mysql +x. This command sets the mysql directory as executable. The problem should be resolved. Quote Link to comment Share on other sites More sharing options...
cuboctahedron Posted May 1, 2003 Author Report Share Posted May 1, 2003 I tried it, but nothing either... The mysql directory and files now have all the permissions.... I reinstalled the whole distro again, and still have the same trouble, really I can't be the only one with this problem. Is there a checklist to see which service/configuration is setup incorrectly/correctly? Quote Link to comment Share on other sites More sharing options...
cuboctahedron Posted May 2, 2003 Author Report Share Posted May 2, 2003 O.k, this is the trick: do: run mysql setup as root 1)mysql_install_db 2)chown -R mysql.mysql /var/lib/mysql that's it really Quote Link to comment Share on other sites More sharing options...
Guest Peo Posted July 28, 2003 Report Share Posted July 28, 2003 I have the same problem, but I don't even have any mysql.sock file :( with the previous installation of MDK 9.1 all worked smoothly. Quote Link to comment Share on other sites More sharing options...
fuzzylizard Posted July 28, 2003 Report Share Posted July 28, 2003 I had the same problem. The fix for me was to change the permissions on the directory and then uninstall and reinstall mysql. This seemed to install the mysql.sock file and set all the permissions up correctly. Quote Link to comment Share on other sites More sharing options...
scoopy Posted July 28, 2003 Report Share Posted July 28, 2003 Peo, Is MySql service started? The sock file will not be there unless MySql is running. Your previous setup may have started MySql service automatically on boot up and now (maybe?) this is not set to start at boot. Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 29, 2003 Report Share Posted July 29, 2003 I did get it working but I found the install severely screwed. First it was trying to run as root. If I remember I started it up by hand, not using the init scripts and it said something like 'cannot be run as root' (this could have been squid though). Steps seem to be create a mysql user, keep UID <500 unless you want to see it on your login screen find all the files installed from the rpm's and change the ownership to mysql:mysql. Find a couple of dodgy directories as mentioned above. Ill tell you more when I get home :-) Quote Link to comment Share on other sites More sharing options...
Guest Peo Posted July 30, 2003 Report Share Posted July 30, 2003 I had the same problem. The fix for me was to change the permissions on the directory. /var/lib/mysql ? Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 30, 2003 Report Share Posted July 30, 2003 Don't do this its meant to be humour ::: Just download the flawed kernel that doesn't repect permissions then all your mysql problems will probably go away... quick get it before it disappears :-) Erm, I wionder if the testers and Mdk used this kernel for the rpm's for mysql ...?? Quote Link to comment Share on other sites More sharing options...
Guest Peo Posted July 30, 2003 Report Share Posted July 30, 2003 I fixed with: chown -R mysql:mysql /var/lib/mysql/ 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.