Hi,
Even if you have mysql installed you will need to get the mysql
adapter written in C for rails. By default, rails ships with the
adapter written in ruby. To do this , just execute '' gem install mysql
''.
Now, for your rails application to use mysql db instead of the default
sqlite3, use the following command,
'' rails <app_name> -d mysql ''
This will configure the rails app to use mysql instead of sqlite3. You
can verify this by checking the ''database.yml'' file once the
app is
created.
Hope this helps.
Regards,
Ashwin
On Sat, Nov 22, 2008 at 12:58 PM, khawshik
<yeasin400-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I installed ruby186-26
> and then run this three command in command line....
> gem update --system
> gem install rails
> gem install mongrel
>
> Now i nedd to install mysql and i wish to working with mysql.
>
> but my database.ymal have this kind of think
>
> database.yml
>
> # SQLite version 3.x
> # gem install sqlite3-ruby (not necessary on OS X Leopard)
> development:
> adapter: sqlite3
> database: db/development.sqlite3
> timeout: 5000
>
> # Warning: The database defined as "test" will be erased and
> # re-generated from your development database when you run
"rake".
> # Do not set this db to the same as development or production.
> test:
> adapter: sqlite3
> database: db/test.sqlite3
> timeout: 5000
>
> production:
> adapter: sqlite3
> database: db/production.sqlite3
> timeout: 5000
>
>
>
>
...................................................................................................................................
>
>
>
> i am working with php so i have mysql 5 installed on my computer and
> also apache
>
> sqlite is better but i am flexible with mysql ..............
>
> last few days i tried hard for enabling mysql instead of sqlite but
>
> there is a plenty of problem..................
>
> can anyone help me please..........................
> i want help for working with mysql.........................
> Can anyone help about the total mysql installation process in ruby and
> connecting to database.
>
>
>
>
>
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---