Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
# Drop and Recreate MySQL
# mysqladmin -uroot -p'secret' drop wn_api
# mysqladmin -uroot -p'secret' drop wn_site
# mysqladmin -uroot -p'secret' create wn_api
# mysqladmin -uroot -p'secret' create wn_site
# Clean up Mongo
# use ugc
# db.word_of_the_day.drop()
# use word
# db.dictionary_entry.drop()
# db.edge.drop()
# db.node.drop()
# db.rels.drop()
# db.start_edge.drop()
# use corpus
# db.doc_metadata.drop()
# db.top_examples.drop()
# db.sentences_with_scores.drop()
# Stuff's on the shared drive
cd /Volumes/Data/api-server-test-data
cd mysql/wn_api
mysql -uroot -p'secret' wn_api < comment.sql
mysql -uroot -p'secret' wn_api < tag.sql
mysql -uroot -p'secret' wn_api < user_handle.sql
mysql -uroot -p'secret' wn_api < user_profile.sql
mysql -uroot -p'secret' wn_api < user_settings.sql
mysql -uroot -p'secret' wn_api < users.sql
cd ../wn_site
mysql -uroot -p'secret' wn_site < words.sql
cd ../mongo
mongorestore -d ugc -c word_of_the_day.bson
mongorestore -d word -c dictionary_entry.bson
mongorestore -d word -c edge.bson
mongorestore -d word -c node.bson
mongorestore -d word -c rels.bson
mongorestore -d word -c start_edge.bson
mongorestore -d corpus -c doc_metadata.bson
mongorestore -d corpus -c top_examples.bson
mongorestore -d corpus -c sentences_with_scores.bson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.