Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/tmp & mysql

Discussion in 'General Discussion' started by canaca, Sep 3, 2003.

  1. canaca

    canaca Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    151
    Im loosing it.

    i looked in the /tmp directory and mysql.sock is missing. I chmoded 4755 and 4777 the /tmp directory and restarted mysql and still nothing ?? i managed to re-install mysql yesterday and fix the problem where it has mysql.sock in the /tmp but today i get here and voala its gone :( the problem i horde is saying :

    fatal error has occurred:

    DB Error: connect failed

    [line 108 of /usr/local/cpanel/base/horde/lib/Prefs/sql.php]

    Details have been logged for the administrator.

    and the log is saying :

    Sep 03 13:15:52 HORDE [emergency] [horde] DB Error: connect failed: [nativecode=Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)] ** Array [on line 108 of "/usr/local/cpanel/base/horde/lib/Prefs/sql.php"]

    I would appreciate some help here guys :) thank you

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    166
    edit /etc/my.cnf

    Make sure that it has the following:
    Code:
    [client]
    port=3306
    socket=/tmp/mysql.sock
    
    [mysqld]
    port=3306
    socket=/tmp/mysql.sock
    If not, then add the above. Save, close and then execute "service mysql stop" and then "service mysql start".

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. canaca

    canaca Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    151
    that worked temporarily but now its gone again. What should i chmod the /tmp folder too ?

    For some reason it keeps dissapearing

    cPanel.net Support Ticket Number:
     
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    166
    tmp should be either 777 or 666.

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. canaca

    canaca Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    151
    i think i figured it out thank you

    i did ln -s /var/lib/mysql/mysql.sock mysql.sock

    cPanel.net Support Ticket Number:
     
  6. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    166
    The contents of the my.cnf file I listed above is telling the server to create the mysql.sock file in /tmp. For security reasons you should actually have /var/tmp symlinked to /tmp and then put restrictions on /tmp....but that's a whole other thread.

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice