0

How would I find out which Database a particular table is present in MySql ?

Mysql version is 
+----------------------+
| version()            |
+----------------------+
| 5.1.35-community-log | 
+----------------------+

As I am having around 25 DB on an instance, I just want to find which database a particular table is present?

2 Answers 2

3
mysql> select * from information_schema.tables where table_name='foo'\G
0

Following query will provides the DB name.

select TABLE_SCHEMA from TABLES WHERE  TABLE_NAME like '%yourtablename%'\G;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .