b a d p o p c o r n

Installing Mysql with MacPorts for Rails on Leopard

Written by Moe on September 19, 2008 | 5 Comments

I just spent a hour going through this so you won’t have to. I thought I installed mysql using mac ports but I kept getting this error.

Errno::ENOENT (No such file or directory - /tmp/mysql.sock):

Below are the three steps you need to get Mysql running on Leopard for MacPorts.

sudo port install mysql5 +server
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock

Posted in Rails

5 Comments


5 Comments »

  1. Hello, this is probably the wrong place to post this but on your jobs listing page, your “contact us” form 404s when you try to submit anything. I was just trying to ask where you guys were located.

    Thanks

    Comment by Chris — September 30, 2008 @ 9:26 pm

  2. Hey,
    Thanks for posting this, it will hopefully be the answer to my mysql nightmares. One problem, though; I’ve followed your steps, and still can’t get rake db:migrate to work.

    If I try to run “$ sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock” again, I get this:
    ln: /tmp/mysql.sock: File exists

    Then when I try to run “rake db:migrate”, I get this contradictory message:
    No such file or directory – /tmp/mysql.sock

    Have you seen this problem, and do you know what to do about it?

    Thanks for any help.

    Comment by Raleigh website maker — November 25, 2008 @ 7:01 am

  3. [...] http://badpopcorn.com/blog/2008/09/19/installing-mysql-with-macports-for-rails-on-leopard/ [...]

    Pingback by Developing web applications locally on your Mac OSX using MacPorts :: Jaisen Mathai — December 9, 2008 @ 1:01 am

  4. Just a copy/paste of the install output about the daemon and creating initial db…

    ###########################################################
    # A startup item has been generated that will aid in
    # starting mysql5 with launchd. It is disabled
    # by default. Execute the following command to start it,
    # and to cause it to launch at startup:
    #
    # sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
    ###########################################################
    —> Installing mysql5 @5.0.75_0+server
    ******************************************************
    * In order to setup the database, you might want to run
    * sudo -u mysql mysql_install_db5
    * if this is a new install
    ******************************************************

    Comment by Ben — February 13, 2009 @ 2:43 pm

  5. Oh, another link:

    http://2tbsp.com/content/install_and_configure_mysql_5_macports

    Comment by Ben — February 13, 2009 @ 2:44 pm

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .