SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Non-Member
    Join Date
    Dec 2000
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've a Red Hat dedicated server with Plesk installed. Saturday I got this error on all my PHP pages: MySQL Connection Failed Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    I looked at all the doc and it really seems that this mysql.sock file has dissappeared from my server, probably because of some maintenance that deleted all files on my tmp dir. I now protected this /tmp/ directory but I still don't have this necessary mysql.sock file

    Anyone knows if I have to re-install completely MySQL to get this file back? Or is there a command that would create it again automatically? I tried to restart MySQL but it doesn't solve the problem I need to have my server working for thursday!

    Thanks A LOT in advance

    sCandy

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That happened to me except for the file lived somewhere else. do a locate mysql.sock and then create a symbolic link from /tmp/mysql.sock to its real location.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    Non-Member
    Join Date
    Dec 2000
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i tried locating the mysql.sock file but it's gone!

    how can i create this file again?

  4. #4
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to restart MySQL in order to get it back, first you need to do killall mysqld, killall safemyslqd, then you need to start mysql with which ever daemon you use.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  5. #5
    Non-Member
    Join Date
    Dec 2000
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah thanks! you saved my life!!! it's strange because i was doing a 'ps' command and it was telling me mysql deamon was not running. still the killall worked and i was able to restart mysql... thanks!

  6. #6
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that was exactly the problem I got at tera-byte (shared server!), but I didn't have to fix it, just a message to support (though it took 4hrs!)
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  7. #7
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It took me a few hours to work it out, on our old server we had a spate of it happening. MySQL partly crashes and you need to killall before you can restart it, we solved it before our provider did (Alabanza). But like I say it had me for about 4 hours while I searched through manuals and what not.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •