Created
December 20, 2013 08:47
-
-
Save k2nr/8052100 to your computer and use it in GitHub Desktop.
ramdisk mysql macOS hombrew
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
#!/bin/bash | |
RAMDISK_SIZE=1024 # MB | |
RAMDISK_BLOCKS=$((2048*$RAMDISK_SIZE)) | |
RAMDISK_ROOT=/Volumes/ramdisk | |
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://$RAMDISK_BLOCKS` &> /dev/null | |
mkdir $RAMDISK_ROOT/mysql | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=$RAMDISK_ROOT/mysql --tmpdir=/tmp | |
mysql.server start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment