Search code examples
phpmysqlsqlinformation-schema

Get FTS index names without information schema


I don't have permission to access information_schema. Can I get a list of FTS indexes for my DB? The following query works but fails for me due to insufficient permission.

SELECT i.name as index_name
FROM information_schema.innodb_sys_tables t
JOIN information_schema.innodb_sys_indexes i USING (table_id)
WHERE t.name = 'my_db/table_name'
AND i.name like 'fts_%'

Is there any alternate way to get the same result?

Note that I have full privilege on my_db database only.


Solution

  • I was able to retrieve it using:

    SHOW INDEX
      FROM table_name
      WHERE Key_name like 'fts_%'
    

    Please post another answer if a better possible solution is available.