how do I grep through a mysql database?
In the INFORMATION_SCHEMA database:
select * from columns WHERE TABLE_NAME LIKE '%tablename%' AND COLUMN_NAME LIKE '%columnname%'
More info here: http://dev.mysql.com/doc/refman/5.0/en/information-schema.html
Ok, it doesn't completely answer your question but you should be able to put it together how you want from here.
mysqldump --compact --skip-extended-insert -u root -proot mydb | grep "interesting string"