Move MySQL database

Dump database from source ...

/usr/local/bin/mysqldump -u'user' -p'password' --database eman_production > eman_production.sql

Create database on target (if not created already).

mysql> create database eman_production;
mysql> grant all privileges on eman_production.* to 'peter'@'localhost' identified by 'pw';

Install dumped data.

mysql -u peter -p eman_production < eman_production.sql

Move rails applications

Remember that /public/dispatch.fcgi permissions is important. +x permissions are needed. Easiest to create new rails application using rails app and the copy application depandent parts afterwards.