Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 439033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:44:10+00:00 2026-05-12T20:44:10+00:00

I made an app in Ruby on Rails and now I want to get

  • 0

I made an app in Ruby on Rails and now I want to get it hosted. However, they require that I use MySQL and I set it up using sqLite3. Is there any way to convert it to use MySQL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:44:10+00:00Added an answer on May 12, 2026 at 8:44 pm

    Step 0

    To be safe, I recommend experimenting a bit with this technique in a virtual machine. Save yourself a bunch of heartache and build a virtual machine, check out your code, and have a safe playground that you can throw away if tragedy strikes.

    Step 1

    Make a backup copy of your database.yml file.

    (from your application root)

    cp config/database.yml config.database.yml.sqlite3

    Step 2

    Make a backup copy of your data

    For Rails 3, install the YAML DB gem: https://github.com/ludicast/yaml_db
    by running

    gem install yaml_db
    

    and then add to your Gemfile.

    gem 'yaml_db'
    

    For Rails 2.x install the YAML DB plugin:

    script/plugin install git://github.com/adamwiggins/yaml_db.git

    Run the dump task

    rake db:dump

    Step 3

    Update your config/database.yml file. You will find entries like

    development:
      adapter: sqlite3
      database: db/development.sqlite3
      timeout: 5000
    test:
      adapter: sqlite3
      database: db/test.sqlite3
      timeout: 5000
    production:
      adapter: sqlite3
      database: db/production.sqlite3
      timeout: 5000
    

    Change them to

    development:
      adapter: mysql
      encoding: utf8
      reconnect: false
      database: **myapp_development**
      pool: 5
      username: **root**
      password: **supersecretpassword**
      **socket: /opt/local/var/run/mysql5/mysqld.sock**
    test:
      adapter: mysql
      encoding: utf8
      reconnect: false
      database: **myapp_test**
      pool: 5
      username: **root**
      password: **supersecretpassword**
      socket: **/opt/local/var/run/mysql5/mysqld.sock**
    
    production:
      adapter: mysql
      encoding: utf8
      reconnect: false
      database: **myapp_production**
      pool: 5
      username: **root**
      password: **supersecretpassword**
      socket: **/opt/local/var/run/mysql5/mysqld.sock**
    

    Be sure to update the values surrounded by asterix as appropriate for your platform! The socket value is only good for Mac OSX using MacPorts. Most flavors of linux do not require this value.

    Step 5

    If you have some errors in the following step, you might have to install the mysql or mysql2 gem:

    sudo gem install mysql
    

    or

    sudo gem install mysql2
    

    Have rake create your database

    rake db:create
    rake db:schema:load
    

    Step 6

    Use YamlDb to reload your data into MySql

    rake db:load

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm transferring a Ruby app I once made into Rails. Now the app does
I have a web app made with Ruby On Rails. For now when I
I have a Rails 3rc app on Ruby 1.9.2 that works fine, but Bundler
I can't get rails 3.1RC4 to work with mysql...? I just made a new
First I made an app and I set its application icon to a icon
I have made an app that gets an array of addresses from a web
I am trying to get a web app made on Zend Framework up but
Greets, Made some app on android. I for the life of me can't get
In the Java Swing app I made it seems to me that all the
I want to skin a vb.net app I made ive googled some stuff and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.