Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    So. Cal. USA
    Posts
    142

    Unanswered: MySQL 4.0.22 on Mac OS X 10.2 ERROR 2002

    Howdy, folks! Just an FYI for Mac users who might encounter the

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

    error after a fresh install of MySQL 4.0.22 using the standard binary install. I spent hours trying to install MySQL and trying to figure out the problem but finally gave up since I had a copy of 4.0.18 and it installed no problem. Here is some info for anyone encountering this problem and is more determined to resolve it than I was...

    -- the 4.0.22 installer for OSX 10.2 worked fine on an iMac G3/500 we had but I could not get it to startup from a beige G3 Server/300
    -- if you login as ROOT, you can check the /usr/local/mysql/data directory for an error log called yourhost.yourdomain.yourtopdomain.err
    -- in my case, amidst the innoDB stuff I saw the mysqld daemon did not have access privileges for what it needed to do; I tried many things, including changing permissions on everything in mysql directory to mysql:mysql, then mysql:daemon, then finally 777 just to see
    -- 777 got me closer, but then the .err file showed that the mysql install tables were not set up (and I remembered reading that someone on the internet with a similar problem transferred tables from another server to get it going); I ran the ./scripts/mysql_install_db in the hopes of installing the tables that did not install the first time but had no joy.
    -- after a few more attempts, I gave up thinking that even if I got everything going, I would not want MySQL to run with 777 files and who knows what other Mickey Mouse crutches I'd have to do

    So, I gave up on 4.0.22 and used an old download I had that was 4.0.18 and it installed flawlessly and started up great. I had also installed 4.1.? and had it working great, too, but 4.1.x changed password security and I could not get it to work w/phpMyAdmin 2.6.? very well. I was able to use OLD_PASSWORD() to convert each user, but I was not able to get MySQL to startup automatically using the --old_password option and I didn't want to have to manually convert every new user I made.

    MySQL 4.0.18 is working fine on this old server. If you're experiencing similar problems w/4.0.22 to what I had, I recommend going to 4.0.18 or 4.1.x. instead. Weird that 4.0.22 worked fine on another computer w/same OS version and G3 cpu...

    Anyway, I did not bother reporting this to either mysql.com or www.entropy.ch since there probably aren't many folks w/beige G3s trying to install 4.022 out there, but just in case you're one of them, I thought I'd recant this tale of woe for the archives in the hopes it helps you out.
    --ST

    BTW, I should add that I researched this quite a bit and also tried things like checking paths/permissions on mysql.sock and stuff, too.
    Last edited by Steve T.; 12-13-04 at 14:39.

  2. #2
    Join Date
    Sep 2003
    Location
    So. Cal. USA
    Posts
    142
    Howdy! OK... I couldn't leave it alone but think I have got the answer, now...

    After posting the message above, I tried to install MySQL 4.0.22 again, but to no avail. I went back to 4.0.18 again, BUT IT COULD NO LONGER WORK EITHER! To make a long story short, I figured out that Mac OS X tracks installations in

    /Library/Receipts

    and in that directory are records of what has been previously installed. When I ran MySQL installations, the full installations were not proceeding because the server thought certain items were already installed. Of course, I had wiped everything I thought relevant out...

    cd /usr/local
    sudo rm -rf mysql*

    cd /Library/StartupItems
    sudo rm -rf MySQL*

    but it turns out that this was insufficent, as a search for visible/invisible "mysql" showed lots of files, most of which don't matter (logs, et. al.). The ones that DID matter, though, were the ones in the /Library/Receipts folder. I had a whole mess of MySQL* and mysql* ones in there. Do this to get rid of them...

    cd /Library/Receipts
    sudo rm -rf MySQL*
    sudo rm -rf mysql*

    After you delete MySQL, you can safely install it again and this time, it'll be a fresh/clean install. In fact, the installer has lots of OK, AGREE, YES, kinda buttons I usually rush through, but the last one is either INSTALL or UPDATE, depending upon whether there are /Library/Receipt files or not. Annoyingly, I had even searched for how to delete MySQL properly and only found pretty much same that I had been doing (i.e. /usr/local/mysql) but I guess Macs need to get rid of additional files, too.

    I hope this helps some Mac OS X folks out there... It had really been bugging me and I had not seen anyone else mention the Receipt files before. Happy developing!
    --ST

  3. #3
    Join Date
    Dec 2004
    Posts
    2
    Steve, I've been searching around the web trying to fix this very same problem on a friend's iBook.

    I noticed *a lot* of people running up against this same problem, but I haven't seen any answers. Basically, people that mess up on their Mac install and want to start over -- can't. Whatever you come up with will help a lot of people.

    In my case, my friend had MySQL 4.1.8 installed on his OS X 10.3.6. MySQL worked fine, except that we couldn't establish a localhost connection through PHP. We found advice saying to use 4.0 instead.

    After shutting down MySQL and installing 4.0.22, we started getting the ERROR 2002, /tmp/socket/whatever, etc.

    Question: I tried deleting everything you said: the usr/local, the startups, and the receipts. But after the re-install, mysqld_safe just "hung" -- no error message or anything. Every time I tried calling mysql from the command line, it immediately froze.

    Any other thoughts/ideas? The only other thing I can think of is restarting the computer and Apache before trying the clean reinstall. Did you do a restart?

    CHRIS

    PS - MySQL 4.1.7 works fine on my G4 with 10.3.6 -- PHP and everything.

Posting Permissions

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