Last active
August 29, 2015 14:06
-
-
Save ewdurbin/33bc8f5031ceeb58e2cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
mysql_install_db --basedir=$(dirname $(mysql_config --variable=pkglibdir)) --datadir=/tmp/lol | |
mysqld --datadir=/tmp/lol --port=65530 --socket=/tmp/lol/mysql.sock --basedir=$(dirname $(mysql_config --variable=pkglibdir)) & | |
sleep 5 | |
echo "CREATE DATABASE km3;" | mysql -u root -h 127.0.0.1 -P 65530 | |
mysql -u root -h 127.0.0.1 -P 65530 km3 < core_db.sql | |
for migration in migrations/*; do mysql -u root -h 127.0.0.1 -P 65530 km3 < $migration; done | |
echo "show tables;" | mysql -u root -h 127.0.0.1 -P 65530 km3 | |
echo "DROP DATABASE km3;" | mysql -u root -h 127.0.0.1 -P 65530 | |
kill %1 | |
rm -rf /tmp/lol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment