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!

Can't connect to local MySQL server ...

Discussion in 'Database Discussion' started by JustinCase, Apr 18, 2009.

  1. JustinCase

    JustinCase Registered

    Nov 29, 2008
    Likes Received:
    Trophy Points:
    Im getting the following error for my forums board for a website I am admin over...

    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/zoom/public_html/forums/db/mysql4.php on line 48

    Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/zoom/public_html/forums/db/mysql4.php on line 330

    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/zoom/public_html/forums/db/mysql4.php on line 331
    phpBB : Critical Error

    Could not connect to the database

    The mainpage is also "Temp. Unavailable" Also.

    I have no knowledge about most of the cPanel stuff so am not sure if just doing a system reboot would help, or restarting the mysql service, or if that would mess up things worse. Any ideas are appreciated. :)

  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You may want to check the following in your script's configuration:

    - servername (typically should be: localhost)
    - database username (typically prefixed with your cPanel username and _)
    - database password
    - database name (always prefixed with your cpanel username and _)

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