# Ruby on Rails and Mysql

**URL:** <https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/159125>\
**Category:** Rails\
**Created:** [January 31, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/159125 "2009-01-31T21:46:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beardy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@beardy](https://www.ruby-forum.com/u/beardy)\
**Post date:** [January 31, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/159125/1 "2009-01-31T21:46:44Z")

</div>

I’m fairly new to programming and the mac and I really want to have a  
go at learning Ruby On Rails, I have followed the set up tutorial on  
Hivelogic and I have a problems that I just can’t fathom out and I  
can’t seem to put the right collection of words into Google to get a  
definitive answer. The problems is:-

1 - I want to use mysql rather than Sqlite. Whilst I have followed  
the instruction on Hivelogic in “Installing Ruby, Rubygems, Rails,  
and Mongrel on Mac OS X 10.5 (Leopard)” every time I create a new file  
structure (e.g. rails example\_application) and I then check the  
database.yml file it still shows the db as sqlite3. Maybe there is no  
way of changing this and my expectation that something magical via the  
config in the tutorial will rewrite this to show mysql in the file is  
misguided??? I installed the mysql gem.

Cheers, Mark.

---

<div class="post-metadata">

**Author:** ![beardy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@beardy](https://www.ruby-forum.com/u/beardy)\
**Post date:** [January 31, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/159125/2 "2009-01-31T22:53:00Z")

</div>

On Sat, Jan 31, 2009 at 8:56 AM, beardy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 1 - I want to use mysql rather than Sqlite. Whilst I have followed  
> the instruction on Hivelogic in “Installing Ruby, Rubygems, Rails,  
> and Mongrel on Mac OS X 10.5 (Leopard)” every time I create a new file  
> structure (e.g. rails example\_application) and I then check the  
> database.yml file it still shows the db as sqlite3.

`rails example_application -d mysql` is what you want.

Assuming you have MySQL itself installed, of course. 🙂

BTW, simply typing `rails --help` would have answered your question.

## FWIW,

Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![beardy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@beardy](https://www.ruby-forum.com/u/beardy)\
**Post date:** [February 2, 2009, 12:06am UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/159125/3 "2009-02-02T00:06:19Z")

</div>

Hi, for people new to ROR this is a really good free introduction  
course.

[http://www.buildingwebapps.com/course](http://www.buildingwebapps.com/course)
