Results 1 to 7 of 7

Thread: MySQL error

  1. #1
    Join Date
    Feb 2004
    Posts
    58

    MySQL error

    I get this error when I try to start mysql through ssh

    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


    and this is what shows up in my php scripts that are trying to access mysql:

    Could not connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


    I really am not sure how this happened. What happened was I turned the register_globals variable on in my php.ini file, rebooted. Then, turned it off, and rebooted. Ever since then I've had this error which I don't quite understand. Anybody know how to fix this?

  2. #2
    Join Date
    Apr 2003
    Location
    Vancouver, Canada
    Posts
    760
    Thread moved to more appropriate forum.
    Paradox Web Hosting - [email protected]
    - Shared and Dedicated Hosting Solutions: www.paradoxwebhosting.com
    - Auto Sales Manager 2004 now available!: www.autosalesmanager.com

  3. #3
    Join Date
    Feb 2004
    Posts
    58
    Also, when i run mysqld_safe I get:

    Starting mysqld daemon with databases from /var/db/mysql
    040408 21:28:14 mysqld ended

  4. #4
    Join Date
    Aug 2002
    Location
    Atlanta, GA
    Posts
    1,114

  5. #5
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    You have to run the 'mysqld_safe & ' command before you run 'mysql '. That creates the socket for you. Also Executes this

    chown -R mysql /var/lib/mysql/*
    chgrp daemon /var/lib/mysql/*

    For more details have a look into this URL

    http://dev.mysql.com/doc/mysql/en/Ca...to_server.html

    Hope this may be resolve the problem.

    Regards,

    Bright

  6. #6
    Join Date
    Jan 2001
    Location
    Miami, FL
    Posts
    1,072
    check to see that non of your hard drive partitions are full. looks like a common error caused by this.
    Biznesshosting, Inc. DBA VOLICO - Intelligent Hosting Solutions
    East Coast Enterprise Dedicated Servers and Miami Colocation.
    managed and unmanaged dedicated servers. High bandwidth colocation. Managed clusters.

  7. #7
    Join Date
    Jan 2002
    Location
    Home, chair
    Posts
    723
    Check what the error log shows in /var/lib/mysql/yourhostname.err

Posting Permissions

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