Skip to content

Instantly share code, notes, and snippets.

@takesato
Created March 25, 2015 02:54
Show Gist options
  • Save takesato/2a20846bf50c2718e0f4 to your computer and use it in GitHub Desktop.
Save takesato/2a20846bf50c2718e0f4 to your computer and use it in GitHub Desktop.
#!/bin/sh
VOLUME_NAME=ramdisk
BSAE_DIR=/usr/local/Cellar/mysql/5.6.22
NUMSECTORS="$(hdiutil attach -nomount ram://1000000)"
diskutil eraseDisk HFS+ $VOLUME_NAME $NUMSECTORS
mysql_install_db --datadir=/Volumes/$VOLUME_NAME --basedir=$BSAE_DIR
$BSAE_DIR/bin/mysqld --basedir=BSAE_DIR --datadir=/Volumes/$VOLUME_NAME --plugin-dir=BSAE_DIR/lib/plugin --bind-address=127.0.0.1 --log-error=/Volumes/$VOLUME_NAME/local.err --pid-file=/Volumes/$VOLUME_NAME/local.pid --port=3307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment