Searching an entire database for a string with mysqldump and grep

If for whatever reason you need to search an entire database (and you don't have PhpMyAdmin available to you) then a really quick and easy way is to use mysqldump and grep.

First do a mysqldump of the database you want to search:

mysqldump -uUSERNAME -p DATABASE_NAME > database-dump.sql

Replacing USERNAME and DATABASE_NAME with your respective details, for more on mysqldump go here: LINK

Once you've got your database in a file just grep!

grep -i database-dump.sql "Search string"

Easy huh :)