After having installed your development environment you need to fill the database with content your Rails application can use. Please follow the instructions to import the database content of your live system into a local MySQL database:
$ <span class='input'>mysqldump -h <em>MySQL-host</em> -u <em>MySQL-login</em> -p <em>DB-name</em> > dump.sql</span> Enter password: <span class='input'>MySQL-password</span>In the example above, the database dump is stored as an uncompressed file,
dump.sql
, in the current directory.
scp
(secure copy).development-host:~ $ <span class='input'>mysql -u root -p</span> Enter password: <span class='input'>MySQL-password</span> Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 275 Server version: 5.0.37 MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> <span class='input'>create database railsdb;</span> Query OK, 1 row affected (0.00 sec) mysql> <span class='input'>grant all on railsdb.* to railsuser@localhost identified by 'railspassword';</span> Query OK, 0 rows affected (0.00 sec) mysql> <span class='input'>exit</span> Bye development-host:~ $ <span class='input'>mysql -u railsuser -prailspassword railsdb < dump.sql</span>
The database access credentials should be the same as in the Rails
database configuration
file (config/database.yml
).