All threads / Connect Rails Application to already existing MySql Database

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Connect Rails Application to already existing MySql Database

Rishabh Shukla asked in Databases
Hi there, I am new to Rails and really enjoying it. 
I am converting my php application to a ROR application. The app is using a MySql DB, so I want to connect the ROR application with that already created DB and want to preserve the data. php has mysqli functions, does ROR has anything similar to that ?

Help appreciated. Warm Regards.
Depending on wether you want to keep running the PHP app. If you don't, read into ActiveRecord, create your models and then write a few migrations to make sure the columns and indexes do match the naming conventions in Rails.
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,629+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.