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 ?

Malerick
  • 5
  • 4
  • Possible duplicate of: http://stackoverflow.com/questions/639531/mysql-search-in-all-fields-from-every-table-from-a-database – Bluedayz Aug 28 '14 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 =/ – Malerick Aug 28 '14 at 12:12
  • Yep, I try all solution, but using Mysql and can't execute a php file (not installed, can't install it) – Malerick Aug 28 '14 at 12:26
  • If total database size is not that big then you can do a [mysqldump](http://stackoverflow.com/questions/14022859/mysql-dump-database-along-data) and search for your value into the resulting file. – ForguesR Aug 28 '14 at 12:34
  • Database take more than 50Go, in 560 table, so this solution can't work >. – Malerick Aug 28 '14 at 12:44

2 Answers2

0

You can use full text search functions in MYSQL

Kindly visit the link below for references :

Full text search MySQL

G.Nader
  • 847
  • 7
  • 9
  • Thanks, but it can also be another think that plan text (varchar for example, so this solution doesn't work – Malerick Aug 28 '14 at 12:45
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!

Eldo
  • 16
  • I presume that I have to change "WHERE `', column_name,'` REGEXP "',in_search,'"'", the ',in_search,', by 'use_config_gift' ? – Malerick Aug 28 '14 at 12:46