# Setting up rails to run with MySQL

**URL:** <https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613>\
**Category:** Rails\
**Created:** [July 9, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613 "2008-07-09T17:58:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 9, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613/1 "2008-07-09T17:58:33Z")

</div>

So I used script/server webrick and it works, but how do I use MySQL  
now? I already configured database.yml… when I try to run  
script/server without webrick I get this error:

!!! Path to log file not valid: log/mongrel.log

Thanks for the help

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 10, 2008, 1:22am UTC](https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613/2 "2008-07-10T01:22:43Z")

</div>

Make sure that you have a log directory in your rails application’s  
root.

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 10, 2008, 2:03am UTC](https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613/3 "2008-07-10T02:03:43Z")

</div>

Make sure that you have a log directory in yo

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 10, 2008, 2:14am UTC](https://www.ruby-forum.com/t/setting-up-rails-to-run-with-mysql/142613/4 "2008-07-10T02:14:50Z")

</div>

Do you have your config\database.yml set up something like this:

development:  
adapter: mysql  
database: myapp\_development  
username: root  
password: my\_pswd  
host: localhost

# 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: mysql  
database: myapp\_test  
username: root  
password: my\_pswd  
host: localhost

production:  
adapter: mysql  
database: myapp\_production  
username: root  
password: my\_pswd  
host: localhost

HTH,  
Richard

On Jul 9, 11:58 am, Justin To [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
