Benjamin Pflugmann wrote:
> 
> Hello.
> 
> On Wed 2002-09-11 at 12:48:02 -0400, [EMAIL PROTECTED] wrote:
> > Is there a MySQL command that will return the amount of disk space used
> > by a particular database? I find lots of references to size limits on
> > tables / databases etc. but nothing on the actual 'disk usage'.
> 
> You can use
> 
>   SHOW TABLE STATUS [FROM yourdatabase] [LIKE pattern]
> 
> in order to see a overview of the tables including their resp. data
> and index file sizes.
> 
> > This would be nice to have I think, since without access to the data
> > directory on the server, I have to ask my ISP to do a 'du' for me. I
> > maintain several databases for clients with my ISP, and since I'm
> > paying for disk space, I'd like to be able to pass that cost on to
> > my clients.
> 
> Bye,
> 
>         Benjamin.
> 
> --
> [EMAIL PROTECTED]

That seems to do it. But I'm not sure what to use for a pattern. My
first attempt I used the table name with a \G and got back some data.
I'm guessing 'Data_length' is the size of the table? That's about right,
since after installing phpMyAdmin, it gives me about the same number.
Thanks!
-- 
/* All outgoing email scanned by Norton Antivirus 2002 */
Amer Neely, Softouch Information Services
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
V: 519.438.5887
Perl | PHP | MySQL | CGI programming for all data entry forms.
"We make web sites work!"


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to