Home Forums OS X Server and Client Discussion Questions and Answers AHHH NO mysql.sock!!!! help?!

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #367537
    darthbator
    Participant

    Hello I recently inherited a Mac OSX Xserve at my job and decided that I would like to run mysql on it. After poking around a little it looks like someone tried to remove the default 4.x.x install of mysql that comes with OSX server. in /var there is a folder named .mysqlold which is empty (I am assuming this is the old mysql directory). I could not find mysql anywhere else on the box, worse yet I could not find mysql.sock anywhere on the box. So I decided to simply go to the mysql stite and download a new mysql binary, so I went ahead and downloaded the mysql build for PPC 64 bit (as my dual G5 xserve should be able to use the 64 bit binary). I go about instsalling the dmg as normal, and it unpacks inside /usr/local/$MYSQLDIR.

    after cd ing into the directory I notice a ./configure script there so I decide to ./configure –help just to see why that’s even there (as the build is binary and not source). The build then informs me that it’s going to start mysql. I go ahead and do a quick ps aux|grep mysql just to make sure and am greeted with.

    [i]root 26832 0.0 -0.0 27808 688 p1 S 3:39PM 0:00.03 /bin/sh ./bin/mysqld_safe –no-defaults
    mysql 26848 0.0 -1.0 92108 20436 p1 S 3:39PM 0:00.13 /usr/local/mysql-standard-5.0.27-osx10.4-powerpc-64bit/bin/mysqld –no-defaults –basedir[/i]

    looks like it’s running to me, however I still cannot connect to the server since there is no mysql.sock. Does anyone know how to create a new one? I checked $MYSQLDIR/bin/mysqld –verbose –help but didn’t come up with much other then some info that lead me to belive that the socket location was still pointing to /var/mysql/mysql.sock. any help would be most appreciated.

    #367566
    crackmac
    Participant

    I’m not an expert but maybe I can help you find more answers.
    You can locate where mysql lives with any variation of the “which” command which locates the binary file.
    % which mysqld_safe
    /usr/local/mysql/bin/
    The most common location for mysql is in the /usr/local/mysql directory. For version and assorted other information use the mysqlcheck command. See the –help for options.
    % mysqlcheck –help
    One of the many things I’ve learned from AFP548.com was the my.cnf file. This file lives in the /etc directory and sets the location of the .sock amongst many other settings. Examples of the conf options are found in the sample config files located in the /usr/share/mysql folder (see my-small.cnf, my-large.cnf etc.).
    Other places of interest are:
    /System/Library/StartupItems/MYSQL
    I hope that helps.
    –KD

    [QUOTE][u]Quote by: darthbator[/u]

    Hello I recently inherited a Mac OSX Xserve at my job and decided that I would like to run mysql on it. After poking around a little it looks like someone tried to remove the default 4.x.x install of mysql that comes with OSX server. in /var there is a folder named .mysqlold which is empty (I am assuming this is the old mysql directory). I could not find mysql anywhere else on the box, worse yet I could not find mysql.sock anywhere on the box. So I decided to simply go to the mysql stite and download a new mysql binary, so I went ahead and downloaded the mysql build for PPC 64 bit (as my dual G5 xserve should be able to use the 64 bit binary). I go about instsalling the dmg as normal, and it unpacks inside /usr/local/$MYSQLDIR.

    after cd ing into the directory I notice a ./configure script there so I decide to ./configure –help just to see why that’s even there (as the build is binary and not source). The build then informs me that it’s going to start mysql. I go ahead and do a quick ps aux|grep mysql just to make sure and am greeted with.

    [i]root 26832 0.0 -0.0 27808 688 p1 S 3:39PM 0:00.03 /bin/sh ./bin/mysqld_safe –no-defaults
    mysql 26848 0.0 -1.0 92108 20436 p1 S 3:39PM 0:00.13 /usr/local/mysql-standard-5.0.27-osx10.4-powerpc-64bit/bin/mysqld –no-defaults –basedir[/i]

    looks like it’s running to me, however I still cannot connect to the server since there is no mysql.sock. Does anyone know how to create a new one? I checked $MYSQLDIR/bin/mysqld –verbose –help but didn’t come up with much other then some info that lead me to belive that the socket location was still pointing to /var/mysql/mysql.sock. any help would be most appreciated.

    [/QUOTE]

    #367613
    gw1500se
    Participant

    It sounds like your install is messed up. The mysql.sock file is a communications socket generate when the server is started. You can’t really create one. When you downloaded MySQL did you get the source or the binaries?

    Assuming you got the binary and it is version 5, be sure you also install the startup items package. Here are some things to check:

    1) Edit /etc/hostconfig and make sure MYSQL=-NO-. That disables the Apple provided version. In addition there should be a MYSQLCOM=-YES-. That is added by the startup items package and is done to avoid conflict with Apple’s version.
    2) The directory for everything is in /usr/local/mysql.
    3) Edit /etc/profile and put /usr/local/mysql/bin at the beginning of the PATH. This assures you will be using the correct mysql commands. (Remember to run ‘. /etc/profile’ after you change it or close the terminal session and start a new one so the new path is active.)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed