1

I have a number of federated tables on my MySQL 5.7.23 and MariaDB 10.1 servers (I was using CREATE SERVER syntax if this matter).

I can easily get a list of these tables using query:

SELECT * FROM `information_schema`.`TABLES` WHERE `ENGINE` = 'Federated';

However, I need to get connection information for all these tables:

CREATE TABLE `table` (
    -- table definition here
)
ENGINE=FEDERATED
CONNECTION='server/table' -- <= I would like to get this info
;

Not the servers I created that are in mysql.servers.

I could not find it in information_schema and mysql databases.

I can only get it from table.frm files or using SHOW CREATE TABLE table; query that is for one table only.

Is it possible to get what I want at all?

Thanks.

fifonik
  • 1,556
  • 1
  • 10
  • 18
  • 1
    https://stackoverflow.com/questions/55968975/where-is-connection-string-of-federated-table-stored-in-mysql mentions `mysql.servers`, but doesn't provide any details. – Barmar Feb 12 '20 at 23:09
  • I'm only using the connection with server. I know where servers stored and how to get them. Actually, I need to check if some servers in the `mysql`.`servers` not used any longer. Right now the only way to do this -- select a list federated tables (as above) and then use `show create table xyz` one by one and read what server mentioned in the table's connection :( – fifonik Feb 13 '20 at 00:15

0 Answers0