Created: 2008-11-25 06:29
Updated: 2018-12-26 06:26
License: mit


Mysql Tasks plugin

A collection of Rake and Capistrano tasks for Rails applications running on MySQL databases


The two tasks I use most are

  1. rake mysql:console

Which drops you into a MySQL console session, connected to your rails applications database

  1. rake mysql:refresh_from_production

Which takes a snapshot of your production database, downloads it and loads it into your local development database.


To make use of the tasks that access your production application you will need Capistrano installed (v2.5 or greater).


Install the plugin

./script/plugin install git://

And add the following line to your deploy.rb file

load 'vendor/plugins/mysql_tasks/lib/mysql_deploy'

Check everything has installed correctly with

rake -T mysql && cap -T

Which should list your new rake and cap mysl tasks

Copyright (c) 2010 Joel Chippindale, released under the MIT license

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more