Skip to content

Instantly share code, notes, and snippets.

@felixcarpena
Created July 11, 2016 00:19
Show Gist options
  • Save felixcarpena/5b1811c350fbcf23352ee97e65ab4e23 to your computer and use it in GitHub Desktop.
Save felixcarpena/5b1811c350fbcf23352ee97e65ab4e23 to your computer and use it in GitHub Desktop.
run mysql on ramdisk for mac os and mysql 5.7
#!/bin/bash
#original script from: http://kotega.com/blog/2010/apr/12/mysql-ramdisk-osx/
diskutil erasevolume HFS+ 'Ramdisk' `hdiutil attach -nomount ram://2097152`
/usr/local/Library/LinkedKegs/mysql/bin/mysqld --initialize-insecure \
--user=visca \
--datadir=/Volumes/Ramdisk \
--basedir=/usr/local/Library/LinkedKegs/mysql \
--explicit_defaults_for_timestamp=1
/usr/local/Library/LinkedKegs/mysql/bin/mysqld_safe \
--basedir=/usr/local/Library/LinkedKegs/mysql \
--datadir=/Volumes/Ramdisk \
--user=visca \
--port=3305 \
--timezone=UTC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment