Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have been trying to start mysql server but got this error:

Can't start server : Bind on unix socket: Operation not permitted
2013-10-21 13:53:54 25098 [ERROR] Do you already have another mysqld server running on socket: [my-home-dir]/mysql-server/mysql.socket ?

I have searched all pages on google on this topic and have tried all methods, but have no luck.

So here are some more details. I do not have root access on the computer. What I do is install mysql server on my local directory. My my.cnf file looks like this:

[mysqld]
 basedir = ~/mysql ## mysql unzipped files
 datadir = ~/mysql-server/data
 port = 3666
 socket = ~/mysql-server/mysql.socket
 user = my-ubuntu-user-name

My installation steps are:

  1. Unzip the source code distribution of mysql 5.6 to ~/mysql
  2. Create my.cnf as I showed above.
  3. Initialize the server. This step does not show error.

    ./scripts/mysql_install_db --defaults-file=my.cnf --user=my-ubuntu-user --datadir=~/mysql-server/data --basedir=~/mysql --socket=~/mysql-server/mysql.socket
    
  4. Start the server

    ./bin/mysqld --defaults-file=my.cnf
    

    And hence comes the error:

    Can't start server : Bind on unix socket: Operation not permitted
    2013-10-21 13:53:54 25098 [ERROR] Do you already have another mysqld server running on socket: [my-home-dir]/mysql-server/mysql.socket ?
    

Also, I have 755 access on all folders related. Any suggestions would be helpful!

---Update

  1. netstat gives no processes on 3666 running.
  2. no process called mysql is currently running.
share|improve this question
    
do you get any output from netstat -tlup | grep 3666 –  Frank Thomas Oct 21 '13 at 20:32
    
Is mysql running? ps -ef|grep mysql|grep -v grep will tell you. 755 won't let you write if you're not the owner. Check who is the owner of ~/mysql-server/ with ls -ld ~/mysql-server/ and ls -ld ~/mysql-server/mysql.socket. –  Calimo Oct 21 '13 at 20:54

1 Answer 1

Can you look at the file at /etc/my.cnf and see whether a property like basedir=/var/lib is there under [mysql.server]?

If it is there, then try to comment out that property and starting mysql again.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.