Skip to content

Instantly share code, notes, and snippets.

View laurynasl's full-sized avatar

Laurynas Liutkus laurynasl

  • Vilnius, Lithuania
View GitHub Profile
@laurynasl
laurynasl / load_mysql_to_ramdisk
Created May 2, 2012 09:51
load mysql to tmpfs
#!/bin/sh
case "$1" in
start)
# stop before starting mysql
cp -Rp /var/lib/mysql /tmp/var_lib_mysql
mount -t tmpfs tmpfs /var/lib/mysql -o size=256m
cd /tmp/var_lib_mysql
cp -Rp * /var/lib/mysql/
cd /