Set up development db from current production db

Configure database name in .rbenv-vars.

vim .rbenv-vars
DB_DEVELOPMENT=ggkbase_development
DB_PRODUCTION=ggkbase_production

Create the database in MySQL at the app’s root directory.

bin/rails db:create db:schema:load

The database tables are now empty. To get us going right away, we need to fill some of the tables with content from the production database.

# Dump critical tables from production database
mysqldump ggkbase_production ecosystems lists local_taxonomies locations ncbi_taxonomies project_groups schema_migrations users > crit_tables.sql

Load the data into the development database.

mysql -h db2 ggkbase_development < crit_tables.sql