# Mysql problem

**URL:** <https://www.ruby-forum.com/t/mysql-problem/175041>\
**Category:** Rails\
**Created:** [September 6, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/mysql-problem/175041 "2009-09-06T20:37:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![player123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4bbf92/32.png) [@player123](https://www.ruby-forum.com/u/player123)\
**Post date:** [September 6, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/mysql-problem/175041/1 "2009-09-06T20:37:34Z")

</div>

hi. im new to rails. how do i set mysql to be my default database?  
when i open the .yml file its always set to sqllite. im following this  
book called ‘railsspace’ and it says i should use mysql but i cant  
because its been giving me problems. thanks!

---

<div class="post-metadata">

**Author:** ![player123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4bbf92/32.png) [@player123](https://www.ruby-forum.com/u/player123)\
**Post date:** [September 7, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/mysql-problem/175041/2 "2009-09-07T14:22:50Z")

</div>

Hi

Is there a way i can provide mysql password while creating rails  
application  
?

Specify rails version while creating new rails project  
[http://funonrails.wordpress.com/2009/04/20/specify-rails-version-to-use-while-creating-rails-project/](http://funonrails.wordpress.com/2009/04/20/specify-rails-version-to-use-while-creating-rails-project/)

Sandip R~

–  
Ruby on Rails Developer

> **[Blogs - Neuigkeiten - Artikel - Webseiten - Medien](https://www.sosblog.com/)**
>
> Auf SOSblog geht es um aktuelle Blogs, Neuigkeiten, Artikel, Webseiten und Medien. Wir bringen interessante neue Webseiten aus den Tiefen des Webs.

> **[Judul Situs](https://funonrails.wordpress.com/)**
>
> “Cinta tidak mengenal batas. Cinta mampu melewati rintangan, melompati pagar, menembus dinding untuk mencapai tujuannya dengan penuh harapan.” — Maya Angelou

> **[Josh Software | Custom Software Development Services & Solutions](https://joshsoftware.com/)**
>
> JoshSoftware offers custom software development Services & Solution that provides enterprise, software development services for web & mobile.

---

<div class="post-metadata">

**Author:** ![player123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4bbf92/32.png) [@player123](https://www.ruby-forum.com/u/player123)\
**Post date:** [September 6, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/mysql-problem/175041/3 "2009-09-06T21:02:44Z")

</div>

2009/9/6 player123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> hi. im new to rails. how do i set mysql to be my default database?  
> when i open the .yml file its always set to sqllite. im following this  
> book called ‘railsspace’ and it says i should use mysql but i cant  
> because its been giving me problems. thanks!

To make a rails app defaulting to mysql use  
rails -d mysql yourappname

But if you did not do this all you have to do is change it in  
database.yml.

There is no need to use mysql if you don’t want to. You can use  
sqlite or postgresql instead.

Have you seen the rails guides at  
[Getting Started with Rails — Ruby on Rails Guides](http://guides.rubyonrails.org/getting_started.html)? The getting  
started guide covers this and is a good intro for beginners. Also the  
other guides and the railscasts are very good.

Colin

---

<div class="post-metadata">

**Author:** ![player123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4bbf92/32.png) [@player123](https://www.ruby-forum.com/u/player123)\
**Post date:** [September 7, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/mysql-problem/175041/4 "2009-09-07T21:55:20Z")

</div>

no.  
if you call rails with -d mysql, rails generates a sample config as  
config/database.yml, you can specify the details there.
