mysql search all tables for string – 2 ways to search whole MySQL database for a particular string

mysql search all tables for string : Search / find through all databases, tables, columns in MySQL: Q – How to search for a string in all fields of every table in a MySQL database?

mysql search all tables for string

MySQL Procedure for search in all fields of all databases. select table_schema as database_name, table_name from information_schema.

Answer : Step 1- Select particular database not table. step 2 – Click ‘Search’ tab, step 3: Enter the search term you want, step 4: Select the tables you want to search in.

phpMyAdmin screen shot:

mysql search all tables for string
mysql search all tables for string

Find tables with a specific string in the name in MySQL database

  • Select the desired database
  • Go to the Search form
  • Fill in your search criteria
  • Press “Go” and browse the results
Read Also:  instamojo payment gateway integration in php

Query

select table_schema as database_name,
    table_name
from information_schema.tables
where table_type = 'BASE TABLE'
    and table_name like '%cat%'
order by table_schema,
    table_name;

simple solution:

Search for all occurrences of a string in a mysql database

mysqldump -u myuser --no-create-info --extended-insert=FALSE databasename | grep -i "<search string>"

Don’t Miss : running sql queries

I hope you get an idea about mysql search all tables for string.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.