Jump to content

Mysql and mandrake 9.1


cuboctahedron
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :angry:

 

Is there a checklist to see which service/configuration is setup incorrectly/correctly?

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

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 ...??

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...