Search text in fields in every table of a MySQL database
I want to search in all fields from all tables of a MySQL database a given string, possibly using syntax as:
SELECT * FROM * WHERE * LIKE '%stuff%'
Is it possible to do something like this?
You could do an SQLDump
of the database (and its data) then search that file.
If you have phpMyAdmin installed use its 'Search' feature.
- Select your DB
- Be sure you do have a DB selected (i.e. not a table, otherwise you'll get a completely different search dialog)
- Click 'Search' tab
- Choose the search term you want
- Choose the tables to search
I have used this on up to 250 table/10GB databases (on a fast server) and the response time is nothing short of amazing.