Ruby on Rails App w/ MySQL on macOS Catalina v10.15

The default database for Ruby on Rails is SQLite. SQLite, although sufficient for beginner apps, is not the best choice for production of more large scale applications, mostly due to it not allowing more than one user to write to the database at a time (concurrency). Having learned how to instead connect a PostgreSQL database through Flatiron, I thought I’d take the opportunity to learn and install MySQL. This post will walk you through installation of MySQL, MySQL Workbench (for viewing your database), and the first steps of building a Rails app with MySQL as your db.

A gif to keep you reading on…
Image for post
Image for post
MySQL in System Preferences
Image for post
Image for post
  1. config/database.yml: you’ll make sure your default looks somewhat similar to this code:

Written by

Software Engineer proficient in Ruby, Ruby On Rails, Javascript & React JS.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store