Skip to content
bwallace edited this page Jan 22, 2013 · 11 revisions

To clear the db:

(at sql prompt):

drop database abstrackr;

create database abstrackr;

Now, to recreate and empty tables in the db:

websetup.py contains the table definitions. Just invoke:

paster setup-app development.ini

To export database to a .sql file:

mysqldump -u root -p abstrackr > dump.sql (you will be prompted for a password)

To import a database from a .sql file:

mysql -u root -p abstrackr < file.sql // (you'll be prompted for a password)

NOTES

On OS X, you need to use mysqld_safe, ie.,

/usr/local/mysql/bin/mysqld_safe

To activate virtual env on OS X, use

source bin/activate

Alternatively, just run commands from within the bin subdirectory. e.g.,

sudo env/bin/paster serve --reload development.ini