dufault.info

Ramblings of a phone weenie, Linux sysadmin, and other things geeky

A Script to Optimize Fragmented Tables in MySQL

I wrote a BASH script that will run “optimize table” on any table fragmented. it’s pretty tidy, and you can supply usernames and passwords, and even run it against remote MySQL databases.
Here’s an example of it’s output:
root@lit [~]# mysqlFragFinder
MySQL fragmentation finder (and fixer) v0.7.2, written by Phil Dufault ( http://www.dufault.info/ )
Found 59 databases
Checking someforum_forum … [...]

Scripts To Make Administrating Lots of MySQL Databases a Little Easier

This post is probably only helpful to a system administrator of large shared servers that happen to have a lot of MySQL databases.
These scripts are meant to administrate all of the databases and tables on a single server currently, I might refine them to also work only database or table name’s supplied.
One of the scripts, [...]