Created
December 20, 2011 22:57
-
-
Save zeke/1503698 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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