Skip to content

Instantly share code, notes, and snippets.

View int03h's full-sized avatar

int three hex int03h

View GitHub Profile
@int03h
int03h / compress-tables.sh
Created October 18, 2016 01:00 — forked from deviantintegral/compress-tables.sh
Compress MySQL Tables
#!/usr/bin/env bash
# Compress MySQL tables on disk.
# Author: Andrew Berry, andrew.berry@lullabot.com
#
# Compress all tables in a MySQL InnoDB database using compression from the
# Barracuda table format. Tables have to already be in the Barracuda file
# format to actually compress tables, otherwise the table setting is ignored.
#
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work.