Forums

[resolved] Mac OS X 10.4.4 MySQL connection problem and solution (12 posts)

  1. amelgares
    Member
    Posted 2 years ago #

    So of course I went ahead and upgraded my two Macs to 10.4.4 and my Wordpress 2.0 and mySQL 4.1.15 systems stopped working with the can't connect to mysql datasource error.

    To fix this, this is what I had to do on two machines running Mac OS X 10.4.4 (client, not server):

    cd /etc
    sudo cp php.ini.default php.ini

    then edit the php.ini file so that the "mysql.default_socket" line is:

    mysql.default_socket =/tmp/mysql.sock

    save the file

    sudo apachectl restart

    and my wordpress blog was back in action.
    I'm not sure if this is some odd thing that just hit my two Macs, but thought this could be of some help to others.

  2. restiffbard
    Member
    Posted 2 years ago #

    Brilliant. Thanks mate. Fixed things before I was even sure there was a problem. If that's the biggest bug in 10.4.4 then things should be fine here out.

  3. ajgiunta
    Member
    Posted 2 years ago #

    Thank you, thank you, thank you. I upgraded my PowerBook last night, which I keep a local copy of Wordpress on to tinker with, and it broke. I spent all morning stumbling through MySQL trying to find the problem. I knew I should have checked here first. Now I can safely upgrade my server. Thanks again!

  4. hanlon_bf
    Member
    Posted 2 years ago #

    Hi

    Tried the solution but I am unable to save the php.ini file when I've made the changes. Pico gives the msg "could not open file for writing: Permissions denied". I've had a couple of tries following the above instructions.

    Any suggestions appreciated.

  5. scottganyo
    Member
    Posted 2 years ago #

    amelgares: you rock!

    hanlon_bf: just set the file to writable before editing:

    >sudo chmod +w php.ini
    >sudo pico php.ini

  6. restiffbard
    Member
    Posted 2 years ago #

    hanlon, don't set the file to writable. it should already be writable.

    your problem is a matter of permissions. the file you're trying to edit is owned by root. Just editing with sudo pico php.ini should be enough. You'll be asked for your system password and then be off to the races.

    not trying to say you're dumb, can't make assumptions about what you know about the terminal, sudo is the command to tell the system that you wish to behave as the super user (aka root).

  7. JohnL
    Member
    Posted 2 years ago #

    amelgares, nice solving. I'd spent time poking around to see whether mysql was running (ps -aux | grep 'mysql'), there were permission problems with mysql data and the error log, how Apple had modified my httpd.conf, whether /tmp/mysql.sock was present, etc. Had I consulted your solution before doing all the other stuff, I'd've been finished 45 minutes ago. Thanks.

    JohnL

  8. hanlon_bf
    Member
    Posted 2 years ago #

    restiffbard, thanks for the extra tip it worked. Not that I'm saying I'm dumb just ignorant :)

  9. dcurry
    Member
    Posted 2 years ago #

    thanks a million for the post!

  10. zebra
    Member
    Posted 2 years ago #

    remember create mysql user, put rights to socket file and then all will work ok

  11. symbol
    Member
    Posted 2 years ago #

    i have the same problem but ony reinstall from yast, reboot and ready. thanks for all post.

  12. jabarig
    Member
    Posted 2 years ago #

    huge help amelgares. Thanks alot

Topic Closed

This topic has been closed to new replies.

About this Topic