All DB connections down

Discussion in 'MySQL' started by antheus, Sep 10, 2008.

  1. #1
    Since yesterday all my DB run websites are down. The other sites which do not use a db are fine. Checked in phpmyadmin and databases are there but they do not connect to the sites.

    Runtime information says: This MySQL server has been running for 0 days, 13 hours, 8 minutes and 34 seconds. It started up on Sep 09, 2008 at 10:18 PM

    But these sites are running for months !

    Was the DB server down and restarted and because of that it lost connection ?
    Tried support and they never replied.
    What are my options? Is there a query for reconnection? What am I to do?
    Thank you
     
    antheus, Sep 10, 2008 IP
  2. sar420

    sar420 Notable Member

    Messages:
    3,147
    Likes Received:
    212
    Best Answers:
    0
    Trophy Points:
    230
    #2
    Hey even my wordpress site was down with the error "Could not connect to database"

    weird
     
    sar420, Sep 10, 2008 IP
  3. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #3
    Create a simple page in php to connect to mysql and use mysql_error() to show the errors.
     
    mwasif, Sep 10, 2008 IP
  4. antheus

    antheus Peon

    Messages:
    432
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How do I do that ?
    Thanx


     
    antheus, Sep 10, 2008 IP
  5. wootty

    wootty Peon

    Messages:
    447
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This page contains some examples of how to return MySQL errors via PHP: http://php.net/mysql_error

    Could be that the hosting company has upgraded MySQL and you now need to use a different connection string/socket (depends on the hoster, whether they have multiple versions of MySQL running etc).
     
    wootty, Sep 10, 2008 IP