Query: SELECT table_schema "database", Round(Sum(data_length + index_length) / POWER(1024,2), 1) "value" FROM information_schema.tables WHERE table_schema="homeassistantdb01" GROUP BY table_schema;
Thank you.
I create all with same username. I think if username is good for 1st time I add query, it must be good for 2nd time.
I think it may be a very simple issue. The problem is a my low experience… If I cannot add same data twice to SQL integration, may any way to running different queries in one time?
the db path: mysql://homeassistant:[email protected]:3306/homeassistantdb01?charset=utf8
query: SELECT table_name AS Table Name, table_rows AS Row Count, ROUND(SUM(data_length)/(1024*1024*1024), 3) AS Table Size [GB], ROUND(SUM(index_length)/(1024*1024*1024), 3) AS Index Size [GB], ROUND(SUM(data_length+index_length)/(1024*1024*1024), 3) Total Size [GB]FROM information_schema.TABLES WHERE table_schema = 'homeassistantdb01' GROUP BY table_name ORDER BY table_name
This query is pointless for the SQL integration, you will only get one (1) value for one column with SQL. The first one above may work but I am not going to type the text manually so you can copy/paste it