Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

here is the log

131229 14:55:27 [ERROR] Can't start server : Bind on unix socket: Permission denied
131229 14:55:27 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?

and what i had down is this in my.cnf:

[mysqld]
socket =/tmp/mysql.sock

what to put the sock file in here and tmp

drwxrwxrwt.  15 root root  4096 Dec 29 14:55 tmp

But I can start it anymore, if I remove that /tmp/mysql.sock. every think is ok. why? why tmp got a 777 permission but it still got this error? thinks in advance.

share|improve this question
    
Looks like 4096 port is already taken. Hav you tried another ones ? –  HAL9000 Dec 29 '13 at 7:27
    
@HAL9000 If it were already taken the error would be "Socket already in use" –  Barmar Dec 29 '13 at 7:36
    
@Barmar yes, but second error log message means, that socket is busy, no? –  HAL9000 Dec 29 '13 at 7:38
    
The second error message is just generic, it prints it regardless of the error it got trying to open the socket. –  Barmar Dec 29 '13 at 7:40
    
What is the ownership and permissions on /tmp/mysql.sock? It needs to be owned by the userid that runs mysqld. –  Barmar Dec 29 '13 at 7:41
show 1 more comment

migrated from stackoverflow.com Dec 29 '13 at 11:33

This question came from our site for professional and enthusiast programmers.

1 Answer

When everything you can think of to check seems right, you have to think of the things you can't think of. :)

Like possibly "apparmor."

http://askubuntu.com/questions/234668/cant-start-mysql-server-if-the-sock-file-is-changed-in-etc-mysql-my-cnf

https://wiki.ubuntu.com/AppArmor

http://en.wikipedia.org/wiki/AppArmor

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.