Afficher un message
Vieux 22/09/2007, 14h48   #2
Axel Schwenke
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to list all existing databases and their size ?

morei@hotmail.com (Mark O'Reilly) wrote:

> How can I list from command line under Linux
> all currently existing MySQL databases, their maximum size and
> their current usage size ?


mysql --table -e "
SELECT TABLE_SCHEMA AS 'database',
SUM(INDEX_LENGTH) AS 'used index',
SUM(DATA_LENGTH) AS 'used data',
SUM(MAX_DATA_LENGTH) AS 'max data'
FROM INFORMATION_SCHEMA.TABLES GROUP BY TABLE_SCHEMA"


however the maximum size will often be arbitrary. Or it may read 0 when
the engine does not have per table limits.


XL
--
Axel Schwenke, Support Engineer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums: http://forums.mysql.com/
  Réponse avec citation
 
Page generated in 0,05237 seconds with 9 queries