Query multiple databases
Date: October 17, 2013 04:07AM
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.
Edited 3 time(s). Last edit at 10/17/2013 06:53AM by Tugdual de LASSAT.
Sorry, only registered users may post in this forum.
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.