rails build database code example
Example 1: create rails app with mysql database
rails new app_name -d mysql
Example 2: how to create a database in production mode rails
RAILS_ENV=production bundle exec rake db:create db:schema:load
rails new app_name -d mysql
RAILS_ENV=production bundle exec rake db:create db:schema:load