At 9:29 PM +0800 6/24/99, Authur Lin wrote:
>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: ********
% cd DATADIR
% 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: http://www.snake.net/nl/