3 years ago, mid-September
Mysql grep - understanding a system
Posted by pbirnie under technology
When working with a new system - There are various techniques I like to use to understand how it works
- firebug net tab
- schemaspy
- any technique that allows me to print the sql fired on each page request
The following is also useful - A simple mysql dump of the database schema with the database insert statements listed as one per line. You can then use grep on the 'currentdb' to find the values for settings or simply see where the data is being stored
set -x
FILE='/home/pbirnie/backups/BACKUP_'`date '+%Y_%m_%d__%H_%M_%S'`;
/usr/bin/mysqldump -u root --skip-extended-insert master_openx > $FILE
/usr/bin/mysqldump -u root --skip-extended-insert master_openx > currentdb
