Quote
I have tried a couple of times to execute the query you gave me, and each time the RAM usage skyrocketed (I monitored it going from 6 GB to 14 GB in about 30 seconds), and then the server died and the service was automatically restarted.
Yikes, that is a catastrophically overloaded system.
We need the numbers. Try it at off-peak times. If that still fails, run it for one engine at a time, eg for innodb ...
select
round( sum(data_length)/1024/1024/1024, 2 ) as data,
round( sum(index_length)/1024/1024/1024, 2 ) as indexes,
round( sum(data_length+index_length)/1024/1024/1024, 2 ) as tot
from information_schema.tables
where engine ='innodb'