Re: Size of DB

2001-09-13 Thread Ian Barwick

On Thursday 13 September 2001 03:12, Antoine E. Hall wrote:
 Hello,

 I'm new to MySQL and I was wondering if there was a command that you can
 issue to see the current size of a mysql database (in kb or MB)?

Not in MySQL as such (unless I've missed something in the meantime).

In Unix/Linux 

du -k /var/mysql/database_name (or wherever your database is located (*))

will get you the total size of all files for that database in kilobytes.
(In Linux du -sh will produce an easier-to-read megabyte value if the total 
is = 1 MB). If MySQL is properly installed you will need root permissions to 
read the data directory.

In Windows you can probably do something involving the mouse and some 
icon-thingies, or maybe a simple DIR at the command line.

(*) If you are not sure, use the command

  SHOW VARIABLES

or at the command line

  mysqladmin variables

and look for 'datadir'.


Ian Barwick



-- 
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de

To query tables in a MySQL database is more fun than eating spam

-
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




Re: Size of DB

2001-09-13 Thread Frank Fisher

Ian Barwick wrote:

 In Windows you can probably do something involving the mouse and some 
 icon-thingies, or maybe a simple DIR at the command line.


Right-click on the MySQL database folder, selecting Properties.

Under DOS, substitute your Unix command with DIR and look at the total 
at the end of the list, and use backslashes instead of forward slashes.

Of course, you could do the icon-thingy with KDE, Gnome, etc.

Frank.


-
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




RE: Size of DB

2001-09-13 Thread Jay Fesco


 I'm new to MySQL and I was wondering if there was a command that you can
 issue to see the current size of a mysql database (in kb or MB)?


If your intent is to get the size 'on the fly' from within a web page, you
can use the filesystem object.  I use ChiliSoft ASP but the solution is the
approximately the same for IIS ASP:

Syntax for a function to return filesize (in JScript/ASP) is:

function ShowFileSize(filespec)
{
var fs, f, s;
fs = new ActiveXObject(Scripting.FileSystemObject);
f = fs.GetFile(filespec);
s = f.Name +  uses  + f.size +  bytes.;
Response.Write(s);
}


Jay Fesco

Magical Mystery Words: database,sql,query,table



-
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




Re: Size of DB

2001-09-13 Thread Ian Barwick

On Thursday 13 September 2001 15:36, Frank Fisher wrote:
 Ian Barwick wrote:
  In Windows you can probably do something involving the mouse and some
  icon-thingies, or maybe a simple DIR at the command line.

 Right-click on the MySQL database folder, selecting Properties.

 Under DOS, substitute your Unix command with DIR and look at the total
 at the end of the list, and use backslashes instead of forward slashes.

And leaving out the command line switches. AFAIK the DOS DIR only shows 
totals in bytes (at least in NT4).

 Of course, you could do the icon-thingy with KDE, Gnome, etc.

Yup, assuming the KDE, Gnome etc. user can read the database directory. Which 
means either the user is running an X-session as root (generally Not A Good 
Thing) or the directory rights have been changed to something other than a 
healthily paranoid 700.

Ian Barwick

-- 
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de

To query tables in a MySQL database is more fun than eating spam

-
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




Size of DB

2001-09-12 Thread Antoine E. Hall

Hello,

I'm new to MySQL and I was wondering if there was a command that you can
issue to see the current size of a mysql database (in kb or MB)?

=
'Toine

-
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