Women in Technology

Hear us Roar



Article:
  Apache Web-Serving With Mac OS X, Part 5
Subject:   "Can't connect to mysql.."
Date:   2002-03-10 05:00:04
From:   dbartlett
When i run the script i get an error message;


"Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /Library/WebServer/Documents/test.php on line 4"


Can anyone suggest a solution ? Sure its just a silly mistake on my part.

Full Threads Oldest First

Showing messages 1 through 6 of 6.

  • "Can't connect to mysql.."
    2002-03-13 21:35:47  rjolly@cape.com [View]

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

    I get this error message too - I think because I can't actually start mysql, or it stops immediately after starting:

    % sudo ./bin/safe_mysqld -user=mysql &
    Starting mysqld daemon with databases from /usr/local/var
    020314 00:27:53 mysqld ended

    I don't get the command prompt back after running the safe_mysqld command ( I interrupt it with a crtl-c), unless I drop that trailing '&' argument. (Which I couldn't find it in the man page.)

    But with or without the ampersand, the results are the same.

    I tried ps auwx - mysql doesn't show up.

    Any ideas?

    And thanks for the very helpful series!
    • "Can't connect to mysql.."
      2003-05-07 21:11:33  jcotton [View]

      I'm having the exact same experience as the other posters in this thread. Anybody ever find a solution? Would it be possible to somehow "undo" the MySQL installation and start from scratch??
  • Morbus Iff photo "Can't connect to mysql.."
    2002-03-11 08:17:45  Morbus Iff | O'Reilly Author [View]

    This error would come up if you hadn't started the MySQL server, or else, when you tried, you got error messages. Could you rerun through the steps to start MySQL (they're the last few lines of code on page 2) and pay attention to what happens?

    If everything looks fine, you can verify that MySQL is running by entering "ps auwx" in your Terminal - you should see some mention of MySQL if everything went smoothly.
    • "Can't connect to mysql.."
      2002-03-12 16:05:21  curran_riley [View]

      I too am getting this (on a home pc - work pc install went off without a hitch).

      I've gone through the steps a couple of times now - but when I enter the third command for the package install, I get:

      Starting mysqld daemon with databases from /usr/local/mysql/data
      ./bin/safe_mysqld: command not found: tee [275]
      ./bin/safe_mysqld: command not found: tee [276]

      I must be missing something - but I've created the mysql user, run the package install, and executed the first 2 commands. But something about that 3rd one doesn't go. Any ideas?

      The error log has entries like this:

      020312 17:58:03 mysqld started
      ./bin/safe_mysqld: command not found: nohup [235]

      P.S. - great series of articles - love having Apache, CGI, and PHP running with so little effort!
      • "Can't connect to mysql.."
        2002-07-12 09:52:15  robertlenne [View]

        I get exactly the same error as curran_riley with the "nohup"-command. Does anyone know what could wrong? It feels like I have tried everything...
        • "Can't connect to mysql.."
          2003-01-29 06:42:57  anonymous2 [View]

          ./bin/safe_mysqld: command not found: tee [275]

          Same problem here. Have you found the answer ??