0

I'm trying to find a value in my SQL database, but documentation doesn't tell in which table or which column is the value.

All information I have is the value "use_config_gift", and I wanna look in all table of the database for finding the text.

Is this possible ? I'm using Mysql on a terminal, and the db is a little big (560+ tables).

Anyone got an idea please ?

5
  • Possible duplicate of: stackoverflow.com/questions/639531/… Commented Aug 28, 2014 at 12:10
  • I try using this post, and getting information in information_schema table help me to find all table name, but I can't use information exept looking in all table one by one =/ Commented Aug 28, 2014 at 12:12
  • Yep, I try all solution, but using Mysql and can't execute a php file (not installed, can't install it) Commented Aug 28, 2014 at 12:26
  • If total database size is not that big then you can do a mysqldump and search for your value into the resulting file. Commented Aug 28, 2014 at 12:34
  • Database take more than 50Go, in 560 table, so this solution can't work >.< Commented Aug 28, 2014 at 12:44

2 Answers 2

0

Try to use this script:

http://kedar.nitty-witty.com/blog/wp-content/uploads/2009/10/find-in-all-databases-tables.sql_.txt

This script was written to search in all dbs but you can replace:

WHERE TABLE_SCHEMA NOT IN ('information_schema','test','mysql');

with:

WHERE TABLE_SCHEMA IN ('YOUR_DB_NAME');

The source :

http://kedar.nitty-witty.com/blog/search-through-all-databases-tables-columns-in-mysql

Bye!

Sign up to request clarification or add additional context in comments.

1 Comment

I presume that I have to change "WHERE ', column_name,' REGEXP "',in_search,'"'", the ',in_search,', by 'use_config_gift' ?
0

You can use full text search functions in MYSQL

Kindly visit the link below for references :

Full text search MySQL

1 Comment

Thanks, but it can also be another think that plan text (varchar for example, so this solution doesn't work

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.