Skip to content

Instantly share code, notes, and snippets.

@bobber205
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobber205/ab74fd4ab3ef86400d45 to your computer and use it in GitHub Desktop.
Save bobber205/ab74fd4ab3ef86400d45 to your computer and use it in GitHub Desktop.
Setting up local db/redis for fast page loads for frontend
Export dev database using Sequel Pros' File -> Export option.
Open up resulting huge file in vim and delete the following lines at the bottom of the file
You'll end up getting an error upon import that says somethign like
Cannot find `admin`@`%`
Delete the 3 stored procedures at the bottom of the file to resolve this including the below.
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;;
# Dump of PROCEDURE userCampaignActions
# ------------------------------------------------------------
/*!50003 DROP PROCEDURE IF EXISTS `userCampaignActions` */;;
/*!50003 SET SESSION SQL_MODE="NO_ENGINE_SUBSTITUTION"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`admin`@`%`*/ /*!50003 PROCEDURE `userCampaignActions`(IN username VARCHAR(255))
This should prevent problems later on from trying to insert data in the DB manually via sequel pro.
Test to make sure you can connect to your local DB by going into vagrant and running
mysql -u root -pvagrant
For now you'll have to set your environment to be hardcoded to "testing" in **index.php** under API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment