Skip to content

Instantly share code, notes, and snippets.

@Ikera
Created March 7, 2016 18:53
Show Gist options
  • Save Ikera/cd3bba645a7861f58372 to your computer and use it in GitHub Desktop.
Save Ikera/cd3bba645a7861f58372 to your computer and use it in GitHub Desktop.
Create new database
mysql -u root -proot
Create db:
# database_name is value for database key in database.yml
create database database_name;
Import db:
leave mysql console
# legacy.sql is dump from some base, most time is good place to put it tmp folder
mysql -u root -proot database_name < tmp/legacy.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment