List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 24 1999 2:52pm
Subject:Re: How can I know the database size?
View as plain text  
At 9:29 PM +0800 6/24/99, Authur Lin wrote:
>Hello ,
>How can I know the database size for our MySQL. If I want to move all
>related files about MySQL to another disk, how to do it ?

Generally your data and status files will be stored under your data
directory (e.g., /usr/local/var or /usr/local/mysql/data).  cd into
that directory and poke around.  du and ls -lR are useful commands
to determine how much space you're using, and whether files or directories
are actually symlinks to other locations.

You can copy the entire data directory to another location (bring the server
down first), then change the --datadir=/path/to/datadir option your
server is started with.

You can also copy the data directory and make the original location a
symlink to the new location:

% mysqladmin -u root -p shutdown
Enter password: ********
% tar cf - bigdb | (cd /var/db; tar xf -)
% mv bigdb bigdb.orig
% ln -s /var/db/bigdb .
% safe_mysqld &

Paul DuBois, paul@stripped
Northern League Chronicles:
How can I know the database size?Authur Lin24 Jun
  • Re: How can I know the database size?Paul DuBois24 Jun
  • Re: Error Codesdenonymous17 Jul
Re: How can I know the database size?Andrew Dunstan24 Jun