Installing Mysql with MacPorts for Rails on Leopard
Written by Moe on September 19, 2008 |
5 Comments
5 CommentsI 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
![[del.icio.us]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[Google]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/google.png)
![[StumbleUpon]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Windows Live]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/email.png)
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
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
[...] 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
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
Oh, another link:
http://2tbsp.com/content/install_and_configure_mysql_5_macports
Comment by Ben — February 13, 2009 @ 2:44 pm