# Mysql on a fresh snow leopard install

**URL:** <https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287>\
**Category:** Rails\
**Created:** [December 16, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287 "2009-12-16T17:36:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 16, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/1 "2009-12-16T17:36:28Z")

</div>

Simply, what’s the best way for me to put mysql on a fresh snow leopard  
install?

Do I need xcode installed first?

Thanks.

bb

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 16, 2009, 9:19pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/2 "2009-12-16T21:19:24Z")

</div>

bingo bob wrote:

> Simply, what’s the best way for me to put mysql on a fresh snow leopard  
> install?
> 
> Do I need xcode installed first?

Yes! You should install Xcode so that you’ll have all the developer  
tools that you will need. Xcode will include Ruby, Rails, gcc (for  
compiling C extensions), etc.

1. Install Xcode.
2. Update RubyGems  
sudo gem update --system
3. Update any outdated gems  
gem outdated  
sudo gem install 
4. Create a new Rails project using MySQL  
rails my\_proj --database mysql
5. Open my\_proj/config/database.yml
6. Install the mysql gem using the instructions at the top of  
database.yml.
7. Install the correct MySQL package for your specific platform  
[http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg](http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg)
8. Make sure mysql is started and working  
$ mysql -u root
9. Make sure the mysql gem is working as expected.  
my\_proj$ rake db:create  
my\_proj$ ./script/dbconsole

That should take care of everything to get you up and running with Rails  
and MySQL.

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 17, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/3 "2009-12-17T12:57:24Z")

</div>

This is bloomin fantastic. Thanks.

However if I’ve got it points 6 and 7 need to be reversed?

Is that right?

cheers

bb.

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 17, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/4 "2009-12-17T15:26:57Z")

</div>

bingo bob wrote:

> This is bloomin fantastic. Thanks.
> 
> However if I’ve got it points 6 and 7 need to be reversed?

Not necessarily. I don’t believe you actually have to install MySQL  
before installing the mysql gem, but I could possibly be wrong about  
that. In any case it shouldn’t hurt to switch those two steps.

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 17, 2009, 5:18pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/5 "2009-12-17T17:18:53Z")

</div>

Robert W. wrote:

> bingo bob wrote:
> 
> > This is bloomin fantastic. Thanks.
> > 
> > However if I’ve got it points 6 and 7 need to be reversed?
> 
> Not necessarily. I don’t believe you actually have to install MySQL  
> before installing the mysql gem, but I could possibly be wrong about  
> that.

You would at least need libmysql-dev, no?

> In any case it shouldn’t hurt to switch those two steps.

Best,  
–Â  
MarnenÂ Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 18, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/6 "2009-12-18T22:26:39Z")

</div>

Marnen Laibow-Koser wrote:

> You would at least need libmysql-dev, no?

Good point. Thanks for clarification. The OP was right I did get those  
reversed. It’s not like I scrutinized that process when I wrote that,  
but was hoping the reader got the general idea.

---

<div class="post-metadata">

**Author:** ![bingobob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Post date:** [December 20, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287/7 "2009-12-20T16:50:14Z")

</div>

It was REALLY useful to show all the steps and got my new Mac up to  
speed with rails and everything uber quick. Thanks very much, I’ll be  
bookmarking this post. bb.
