My SQL Database error please help!

Discussion in 'MySQL' started by tarmetjoe, Apr 30, 2012.

  1. #1
    I was running a successful (drupal) site using Mysql until I suddenly started to get the following error: "PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in db_table_exists()"

    I don't know what this means or how to fix it, but when I visit phpmyadmin I get the following message: "#2013 - Lost connection to MySQL server at 'reading initial communication packet', system error: 61"

    Can someone please help, I spent hours developing this site and really need to fix these errors.
     
    tarmetjoe, Apr 30, 2012 IP
  2. Iann@LFCVPS

    Iann@LFCVPS Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It sounds like MySQL isn't started or in some inconsistent state. Have you tried restarting the MySQL service yet?
     
    Iann@LFCVPS, May 1, 2012 IP
  3. tarmetjoe

    tarmetjoe Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for responding. How would I restart the service?
     
    tarmetjoe, May 1, 2012 IP
  4. Iann@LFCVPS

    Iann@LFCVPS Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It depends, what operating system are you running on this server?
     
    Iann@LFCVPS, May 1, 2012 IP
  5. Ruddo

    Ruddo Member

    Messages:
    821
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    43
    #5
    If you have access to the command line try service mysqld restart
     
    Ruddo, May 1, 2012 IP
  6. tarmetjoe

    tarmetjoe Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Mac 10.6, I have MAMP and acquia dev desktop running my stack.
     
    tarmetjoe, May 1, 2012 IP
  7. Iann@LFCVPS

    Iann@LFCVPS Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I'm not familiar with that myself, but Ruddo's suggestion may still apply, but I imagine that since this is Mac there is an easy way to restart the whole MAMP package.
     
    Iann@LFCVPS, May 1, 2012 IP