Find the answer to your Linux question:
Results 1 to 4 of 4
Hi folks, ubuntu-6.06.1-LAMP-server-amd64 After running; $ sudo apt-get -install mysql-server mysql-client. mySQL did not start, complaining "mysqld.sock" missing. On googling I found following postings; http://ubuntuforums.org/showthread.php?t=111292 http://ubuntuforums.org/showthread.php?t=140036 $ cat /etc/mysql/my.cnf | ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    mysqld.sock missing


    Hi folks,

    ubuntu-6.06.1-LAMP-server-amd64

    After running;
    $ sudo apt-get -install mysql-server mysql-client.

    mySQL did not start, complaining "mysqld.sock" missing.

    On googling I found following postings;
    http://ubuntuforums.org/showthread.php?t=111292
    http://ubuntuforums.org/showthread.php?t=140036

    $ cat /etc/mysql/my.cnf | grep .sock
    Code:
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    socket          = /var/run/mysqld/mysqld.sock
    socket          = /var/run/mysqld/mysqld.sock
    socket          = /var/run/mysqld/mysqld.sock
    It was there.

    $ sudo mysqld
    Code:
    Password:
    061109 15:41:52  InnoDB: Started; log sequence number 0 43655
    061109 15:41:52 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    061109 15:41:52 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    061109 15:41:52 [ERROR] Aborting
    
    061109 15:41:52  InnoDB: Starting shutdown...
    061109 15:41:54  InnoDB: Shutdown completed; log sequence number 0 43655
    061109 15:41:54 [Note] mysqld: Shutdown complete
    $ sudo netstat -tap | grep mysql
    Password:
    No printout.

    I can't figure out a solution. Please help. TIA


    B.R.
    satimis

  2. #2
    Just Joined!
    Join Date
    Sep 2003
    Posts
    3
    I know this is an old thread but if anybody lands here while looking for a solution try making a symbolic link to /var/run/mysqld/mysqld.sock in /tmp. This will give you /tmp/mysqld.sock, so you will need to change this to mysql.sock. I did# cp -rf mysqld.sock mysql.sock.

    Good luck.

  3. #3
    Just Joined!
    Join Date
    Aug 2007
    Location
    California
    Posts
    2

    Question I am having the same problem with Ubuntu 6.06 and MYSQL

    Hello group.
    UBUNTU 6.06
    Postfix
    MYSQL

    I am working on my new www/SMTP server and presently have an issue with MYSQL when attempting to start MYSQL.
    I am working with the tutorial at : How to set up a mail server on a GNU / Linux system.

    When I run '/etc/init.d/mysql start' I receive the following error...

    Code:
    ...failed or took more than 6s.
    		Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    I took a look inside of the 'syslog' here are it's contents...

    Code:
    Aug 20 17:01:14 72 /etc/init.d/mysql[29750]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Aug 20 17:01:14 72 /etc/init.d/mysql[29750]:
    Aug 20 17:09:01 72 /USR/SBIN/CRON[29946]: (root) CMD (  [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
    Aug 20 17:09:01 72 /USR/SBIN/CRON[29948]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Aug 20 17:17:01 72 /USR/SBIN/CRON[30164]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Aug 20 17:20:47 72 mysqld_safe[30336]: started
    Aug 20 17:20:47 72 mysqld[30339]: 070820 17:20:47  InnoDB: Started; log sequence number 0 43655
    Aug 20 17:20:47 72 mysqld[30339]: 070820 17:20:47 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    Aug 20 17:20:47 72 mysqld[30339]: 070820 17:20:47 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    Aug 20 17:20:47 72 mysqld[30339]: 070820 17:20:47 [ERROR] Aborting
    Aug 20 17:20:47 72 mysqld[30339]:
    Aug 20 17:20:47 72 mysqld[30339]: 070820 17:20:47  InnoDB: Starting shutdown...
    Aug 20 17:20:50 72 mysqld[30339]: 070820 17:20:50  InnoDB: Shutdown completed; log sequence number 0 43655
    Aug 20 17:20:50 72 mysqld[30339]: 070820 17:20:50 [Note] /usr/sbin/mysqld: Shutdown complete
    Aug 20 17:20:50 72 mysqld[30339]:
    Aug 20 17:20:50 72 mysqld_safe[30367]: ended
    Aug 20 17:21:03 72 /etc/init.d/mysql[30490]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Aug 20 17:21:03 72 /etc/init.d/mysql[30490]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Aug 20 17:21:03 72 /etc/init.d/mysql[30490]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Aug 20 17:21:03 72 /etc/init.d/mysql[30490]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Aug 20 17:21:03 72 /etc/init.d/mysql[30490]:
    Aug 20 17:23:38 72 mysqld_safe[30657]: started
    Aug 20 17:23:38 72 mysqld[30660]: 070820 17:23:38  InnoDB: Started; log sequence number 0 43655
    Aug 20 17:23:38 72 mysqld[30660]: 070820 17:23:38 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    Aug 20 17:23:38 72 mysqld[30660]: 070820 17:23:38 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    Aug 20 17:23:38 72 mysqld[30660]: 070820 17:23:38 [ERROR] Aborting
    Aug 20 17:23:38 72 mysqld[30660]:
    Aug 20 17:23:38 72 mysqld[30660]: 070820 17:23:38  InnoDB: Starting shutdown...
    Aug 20 17:23:40 72 mysqld[30660]: 070820 17:23:40  InnoDB: Shutdown completed; log sequence number 0 43655
    Aug 20 17:23:40 72 mysqld[30660]: 070820 17:23:40 [Note] /usr/sbin/mysqld: Shutdown complete
    Aug 20 17:23:40 72 mysqld[30660]:
    Aug 20 17:23:40 72 mysqld_safe[30688]: ended
    Aug 20 17:23:53 72 /etc/init.d/mysql[30811]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Aug 20 17:23:53 72 /etc/init.d/mysql[30811]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Aug 20 17:23:53 72 /etc/init.d/mysql[30811]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Aug 20 17:23:53 72 /etc/init.d/mysql[30811]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Aug 20 17:23:53 72 /etc/init.d/mysql[30811]:
    I am quite confident that this is nothing more than a missing file, but I am pruley stumped how to replace it if that is all that is required at this point??

    Thanks for your help

    Regards

  4. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    1

    Solution for mysqld.sock missing: adding symbolic link in /tmp to mysqld.sock works!

    Hey guys,

    I am running ubuntu and was trying to install Mysql. I was getting the error:

    InnoDB: Started; log sequence number 0 43655
    090116 12:54:09 [ERROR] Can't start server : Bind on unix socket: Permission denied
    mysqld[21068]: 090116 12:54:09 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?

    After being stumped for a long time, I was desperate enough to try the fix suggested in this thread. It worked!!!!

    Specifically, I typed the following:

    #cd /tmp
    # sudo ln -s /var/run/mysqld/mysqld.sock mysqld.sock
    #sudo /etc/init.d/mysql start &

    And mysql was running just fine!

    Thought I would share this with you all so that you know this solution is valid and working as of Jan 16, 2009.

    Srikanth.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •