development:
adapter: mysql2
encoding: utf8
reconnect: false
database: DBName_development
pool: 5
username: root
password: Your Password (If you have)
host: localhost
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: DBName_test
pool: 5
username: root
password: Your Password (If you have)
host: localhost
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: DBName_production
pool: 5
username: root
password: Your Password (If you have)
host: localhost
After editing the database.yml file, go to the root of the Rails application via command-line
---> rake db:create
This command will create the database or DBName_development in MySQL.
The following command can be used to your import SQL file (.sql) into DBName_development:
mysql -u root -p app_development < path_to_.sql/filename.sqlIf SQL file is in another directory, for example, you can use ~/Desktop/filename.sqlA complete migration can be applied to the development database from the command line (inside your application's RAILS_ROOT directory): rake db:migrate
please send the video for this guide
ReplyDelete