Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql-4.0.10 ebuild bug - unable to create mysql.sock - help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ricko
n00b
n00b


Joined: 21 Feb 2003
Posts: 11

PostPosted: Fri Feb 21, 2003 2:11 am    Post subject: mysql-4.0.10 ebuild bug - unable to create mysql.sock - help Reply with quote

After emerging dev-db/mysql-4.0.10 on a fresh install of Gentoo. Mysqld fails to run (/etc/init.d/mysql start) with the following error in mysql.log
Code:
030221 01:49:43  mysqld started
030221  1:49:43  Can't start server : Bind on unix socket: Permission denied
030221  1:49:43  Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
030221  1:49:43  Aborting
030221  1:49:43  /usr/sbin/mysqld: Shutdown Complete
030221 01:49:43  mysqld ended

If I alter the mysql my.cnf to have mysqld run as root, mysql runs fine. Must be a privilege problem then right?
Code:
# ls -ld /var/log/mysql/ /var/run/mysqld/ /var/lib/mysql/
drwxr-xr-x    5 mysql    mysql         176 Feb 21 01:25 /var/lib/mysql/
drwxr-xr-x    2 mysql    mysql         112 Feb 19 23:44 /var/log/mysql/
drwxr-xr-x    2 mysql    mysql          48 Feb 21 01:55 /var/run/mysqld/


Running strace /usr/sbin/mysqld --user=mysql yields:
Code:
bind(4, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = -1 EACCES (Permission denied)


It is obviously having problems creating mysql.sock in /var/run/mysqld but the privileges apprear correct. What am I missing? :?:

Update: I do have Grsecurity installed.
Update: just compiled a new kernel without Grsecurity, same problem.


Last edited by ricko on Fri Feb 21, 2003 9:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
mark_wales5
n00b
n00b


Joined: 23 Nov 2002
Posts: 21
Location: UK

PostPosted: Fri Feb 21, 2003 10:32 am    Post subject: Reply with quote

Yes, I think it must be a permissions problem. Does the other user account (i.e. not root) have the appropriate permissions to create sockets? I'm relatively new to linux, but I think this is the problem. Google for sockets and linux and see what comes up. Sorry I can't be more specific but I don't really know the answer.
_________________
-Mark-
Back to top
View user's profile Send private message
ricko
n00b
n00b


Joined: 21 Feb 2003
Posts: 11

PostPosted: Sat Feb 22, 2003 12:24 am    Post subject: Problem solved Reply with quote

Problem solved:
Turns out that the root of / was not executable after doing a Gentoo stage-1 install. After the install the root looked like this:
Code:
# ls -la /
drwx------   18 root     root          536 Feb 21 23:15 .
more...

The Fix:
Code:
# chmod a+x /
# ls -la /
drwx--x--x   18 root     root          536 Feb 21 23:15 .
more...

Why is it that the obvious stuff is so hard to find? Hope this helps someone else out there. I would like to thank Dean at www.homelan.com for helping me debug this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum