title: Need to switch from SQLite3 to MySQL, and want to deploy with MySQL
body: <p>We are currently using <code>SQLite3</code> as our database and want to switch it to <code>MySQL</code> before we send our Rails app live via Passenger and Nginx to our Linode Ubuntu 10.04 Lucid box.</p>
  
  <p>we set up the msql server on our linode ubuntu 10.04 box
  and set a password for the root user. how do we configure <code>database.yml</code> ? what are the steps to set up this <code>MySQL</code> database? We have the <code>mysql2</code> gem installed and in our Gemfile.</p>
  
  <p>What does <code>database.yml</code> need to look like in order to deploy with <code>MySQL</code> ?</p>
  
  <p>Does the database need any specific name as in <code>database name</code>?</p>
  
  <p>Do we go about running <code>rake db:create</code> on our machine or run it on our Ubuntu box?</p>
  
  <p>current <code>database.yml</code></p>
  
  <pre><code># SQLite version 3.x
  # gem install sqlite3
  # 
  # Ensure the SQLite 3 gem is defined in your Gemfile
  # gem 'sqlite3'
  development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 2000
  
  # 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
  pool: 5
  timeout: 2000
  
  production:
  adapter: mysql2
  encoding: utf8
  database: production
  pool: 5
  username: root
  password: "mysql password"
  </code></pre>