The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Sock Error

Discussion in 'General Discussion' started by Mini, Feb 10, 2006.

  1. Mini

    Mini Well-Known Member

    Joined:
    Mar 4, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I am having this problem where I am getting these errors when I start mysql normally ('/etc/init.d/mysql start').

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    So, I have to start MySQL with the command: /usr/bin/safe_mysqld --skip-grant-tables &

    Which is very annoying at times.. does anyone know what the error is and how to fix it?

    Thanks,
    Mini
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    /tmp/ permissions correct?
     
  3. Mini

    Mini Well-Known Member

    Joined:
    Mar 4, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Yes, I believe it's CHMODed to 1777.

    Thanks,
    Mini
     
  4. 24x7team

    24x7team Well-Known Member

    Joined:
    Jan 16, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    really tough to find
    mysql.sock

    YOu are getting the errors that the sock is missing from the location

    '/var/lib/mysql/mysql.sock'

    That means your sock is been created in /tmp

    So i suggest you to symlink

    cd /var/lib/mysql/
    ln -s /tmp/mysql.sock

    This should resolve the problem...
     
Loading...

Share This Page