Results 1 to 8 of 8
  1. #1

    mysql.sock problem,

    Hello, i have one problem please help me, i deleted /tmp/mysql.sock by mistake and /var/lib/mysql/mysql.sock i deleted too, i tried reinstall mysql with cpanel "Install an RPM", after i tried restart mysqld and i got error :
    Attempting to restart mysql
    Waiting for mysql to restart.... . . . . . . . . . . finished.
    mysql status
    mysql has failed, please contact the sysadmin (result was "/usr/bin/mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)").
    anybody can help me how to put back that mysql.sock please, its very important. Thank you.

  2. #2

    Re: mysql.sock problem,

    Originally posted by terkhost
    Hello, i have one problem please help me, i deleted /tmp/mysql.sock by mistake and /var/lib/mysql/mysql.sock i deleted too, i tried reinstall mysql with cpanel "Install an RPM", after i tried restart mysqld and i got error :
    anybody can help me how to put back that mysql.sock please, its very important. Thank you.
    What is the version of your mysql?
    Professional Web Hosting Solutions
    www.iexpresshost.com
    Get serious about your business.
    Fax/Voice Mail 206-339-7080

  3. #3
    Join Date
    Nov 2001
    Posts
    551
    Have your tried killall from the command line?

    Ala:
    # killall mysqld
    # killall safe_mysqld

    have not idea what type of damage this will do to your databases, so use at your own risk.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    1,125
    Try this:

    service mysql stop
    /etc/rc.d/init.d/chkservd stop
    rm -rf /var/lib/mysql/mysql.sock
    rm -rf /usr/local/lib/mysql.sock
    service mysql start
    /etc/rc.d/init.d/chkservd start
    locate mysql.sock
    ln -s /var/lib/mysql/mysql.sock /var/tmp/mysql.sock

  5. #5
    Join Date
    May 2003
    Posts
    1,664
    Rob has the fix there, that should take care of it. Did you secure your /tmp directories without making backups? That's usually what does that.

  6. #6
    He has stated that he did delete them by mistake. Happened a long time ago with us. Was trying to clean up the /tmp dir and pulled the plug on the sock file

  7. #7
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,290
    Originally posted by Allwin A
    He has stated that he did delete them by mistake. Happened a long time ago with us. Was trying to clean up the /tmp dir and pulled the plug on the sock file
     

    cd /tmp;rm -rf * | grep -v mysql.sock;

    heh
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  8. #8
    /tmp is just a sym link and those are easily corrected by recreating the sym link. Deleting the actual file in Mysql needs a few more steps (listed above)
    Like us on Facebook to qualify for discounts!
    http://www.sprintserve.net
    Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | Wordpress Hosting |
    Services: | Managed Multiple Cores 64bit Servers | Server Management |

Posting Permissions

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