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.

Error with database connection in all the websites

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

  1. harrel

    harrel Registered

    Joined:
    Sep 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
  3. harrel

    harrel Registered

    Joined:
    Sep 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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