myself_database_name为数据库名称
select TABLE_NAME, INDEX_NAME, GROUP_CONCAT(COLUMN_NAME) as INDEX_COLUMN
from
information_schema.statistics
where
table_schema='myself_database_name' and INDEX_NAME <> 'PRIMARY'
and NON_UNIQUE = 1
GROUP BY TABLE_NAME, INDEX_NAME;