Through which table can the table name and database name be found based on table_id in mysql.stats_meta?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: mysql.stats_meta根据table_id,通过哪张表可以查到表名,和库名

| username: zuoyanmeng

I think the problem is that the tidb-server process is not running. You can check if the process is running using the ps command. If it is not running, you can start it using the systemctl start tidb command.

| username: xfworld | Original post link

Are you referring to this?

  • TIDB_TABLE_ID: Identifies the internal ID of the table, which is unique within a TiDB cluster.
| username: zuoyanmeng | Original post link

I want to find show stats_meta, how can I write it using the select syntax (or show stats_meta can only display the columns I want)?

| username: xfworld | Original post link

This might not be supported~ We’ll have to think of another way.

| username: yiqing2021 | Original post link

This can be achieved with the following query:

select * from mysql.stats_meta a, INFORMATION_SCHEMA.TABLES t where a.table_id = t.TIDB_TABLE_ID