Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unanswered: Error's when trying to connect

    Code:
    [chroder@EIN chroder]$ /usr/local/mysql/bin/mysqladmin version
    /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
    I've just installed mySQL on my RedHat9 system and now when I try to start it it gives me that error. When I installed it yesterday and ran mysqladmin, it worked fine, but now it won't. Any ideas?

    I start it up by going ./bin/safe_mysql & (from the mysql directory) and it always hangs, outputting nothing so I end up closing the terminal window. If I try to start it again it says there is already a process, if I test it it gives errors. So I really don't know what to do.

    Any light in the situation would be appreciated.

    Thanks in advanced

  2. #2
    Join Date
    Aug 2003
    Location
    FDR India
    Posts
    24
    Hi

    Try looking for answers in MySQL's error log file. By default its in ./mysql/data.

    Do you get the same errors even when trying to connect via mysql client? Do check if the file mysql.sock exists.

    regards
    theN

  3. #3
    Join Date
    Aug 2003
    Posts
    4
    There doesnt seem to be anything in ./data/mysql, and /tmp/mysql.sock doesn't exist.

    And I get the same error when trying to connect via PHP

  4. #4
    Join Date
    Aug 2003
    Location
    FDR India
    Posts
    24
    Hi
    doesnt seem to be anything in ./data/mysql...
    (Assuming that was a typo about the directory structure)

    If you there's *nothing* in "/usr/local/mysql/data", then you haven't completed the installtion of MySQL. If you think you completed installation of MySQL, you should *atleast* have the following directory - "/usr/local/mysql/data/mysql". Do you have it?

    AFAIK, the mysql.sock file exists *only* as long as mysqld is running. So DON'T look for it when when MySQL IS NOT running. *If* you know mysqld is running and *yet* there's no mysql.sock then its a simple issue of permissions. Check if mysql user has permission to write to /tmp & check mysql.ini file to ensure mysql.sock is enabled and also the path where's its being written.

    Last but not the least, please spend some more time with the MySQL manual. The online version (w/ user comments) is excellent.

    regards
    theN

  5. #5
    Join Date
    Aug 2003
    Posts
    4
    Yes, I've got that. And my /tmp directory is CHMOD'ed to 777, and still nothing. Whenever I try to start it always says its ended

    Code:
     cd /usr/local/mysql
    bin/mysqld_safe &
    [1] 4329
    Starting mysqld daemon with databases from /var/lib/mysql
    030826 10:04:53  mysqld ended
     
     
    [1]+  Done                    bin/mysqld_safe
    Thanks for your help, its killin' me why it isn't working. I will have to read through the manual.

Posting Permissions

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