MySQL Forums
Forum List  »  MyISAM

Query multiple databases
Posted by: Tugdual de LASSAT
Date: October 17, 2013 04:07AM

Hello.

I'm having difficulties making a query work correctly
I have a mysql server running approx 1500 databases.
I have a table of 10 fields called 'access' that is present in approx 1300 databases. I am able to obtain list of existing couples database/tables through a query in information schema on table_schema and table_name.
In this table i have a field 'ConnectIP' that contains several values on some databases, and a unique value on other databases.

I'd like to query server to obtain :
- List of all IP's in all databases.
and then query server to update erronous IP to a new value.

I'm trying things around :
select ConnectIP from ( select concat_ws('.',TABLE_SCHEMA,TABLE_NAME) from information_schema.TABLES where TABLE_NAME = "access") as t2;
and get this error :
ERROR 1054 (42S22): Unknown column 'ConnectIP' in 'field list'


Can anyone help me to get documentation on how to do this ?
Sorry if this topic is in the wrong forum, i did not see a query modelling forum / topic.

Yours

Tdldp



Edited 3 time(s). Last edit at 10/17/2013 06:53AM by Tugdual de LASSAT.

Options: ReplyQuote


Subject
Views
Written By
Posted
Query multiple databases
9480
October 17, 2013 04:07AM
3657
October 18, 2013 08:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.