Search text in fields in every table of a MySQL database

前端 未结 24 2075
梦谈多话
梦谈多话 2020-11-22 06:23

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%\'
         


        
24条回答
  •  广开言路
    2020-11-22 06:39

    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.

提交回复
热议问题