Generally, in order to use MySql for a Rails app there are a few steps that need to be followed. First, install MySql itself:
sudo apt-get install mysql-server
You’ll also want to create a separate user and database for your app. This tutorial will walk you through creating users in MySql:
Next, require the
mysql gem in your app’s
Gemfile and re-run
bundle install in order to install it.
Then in your
config/database.yml file, you’ll need to set the correct information for your app to be able to connect to the database. It would look something like this:
Hopefully, this points you in the right direction. Let us know how it goes!
MySQL is a powerful database management system used for organizing and retrieving data. This tutorial explains how to to create new MySQL users and how to grant them the appropriate permissions.