Skip to content

Instantly share code, notes, and snippets.

@k2nr k2nr/gist:8052100
Created Dec 20, 2013

Embed
What would you like to do?
ramdisk mysql macOS hombrew
#!/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
You can’t perform that action at this time.