cannot start mysql server bind socket denied

0

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.

user205781

Posted 2013-10-21T20:29:34.200

Reputation: 1

do you get any output from netstat -tlup | grep 3666 – Frank Thomas – 2013-10-21T20:32:25.277

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 – 2013-10-21T20:54:56.517

Answers

0

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.

lkamal

Posted 2013-10-21T20:29:34.200

Reputation: 151