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!

Error with database connection in all the websites

Discussion in 'Database Discussion' started by harrel, Sep 12, 2011.

  1. harrel

    harrel Registered

    Joined:
    Sep 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hello, I'm using a apache dedicated server with 8 GB ram, an a dual quad core CPU. Recently we just cleaned the /tmp directory. But the apache settings were not modified.

    The sites were running fine, but then suddenly all the websites started showing error establishing database connection. All the wordpress, joomla and forums. The phpmyadmin is working fine from cPanel.

    I restarted mySQL, it restarted successfully and then the websites weren't even loading.

    Is it a problem with http.conf???

    Is it caused by something else? How can I fix this problem? Please help.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You likely destroyed the symlink in /tmp for mysql.sock file:

    Code:
    root@host [/tmp]# ls -lah mysql.sock
    lrwxrwxrwx 1 root root 27 Aug 26 12:50 mysql.sock -> ../var/lib/mysql/mysql.sock=
    Try to recreate the symlink:

    Code:
    ln -s /var/lib/mysql/mysql.sock mysql.sock
    Then restart MySQL again.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. harrel

    harrel Registered

    Joined:
    Sep 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Yep, I checked that. That wasn't the problem. The server was under SYN attack. After neutralizing the attack and after installling a cisco firewall, the problem went away.
     
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