Re: MySQL question...
From: Melvyn Sopacua (freebsd-questions_at_webteckies.org)
Date: 11/30/03
- Previous message: Lee Harr: "re: mplayer problem"
- In reply to: DG: "RE: MySQL question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "'FreeBSD-questions'" <questions@FreeBSD.ORG> Date: Sun, 30 Nov 2003 23:27:55 +0100
On Sunday 30 November 2003 22:57, DG wrote:
> > -----Original Message-----
> > From: owner-freebsd-questions@freebsd.org
> > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of
> > Melvyn Sopacua
> > Sent: Monday, 1 December 2003 3:54 AM
> > To: FreeBSD-questions
> > Cc: Xpression
> > Subject: Re: MySQL question...
>
> <snip>
>
> > All databases will go under /var/db/mysql and the quick and
> > dirty answer is:
> > mysql -e "GRANT ALL ON $dbname.* TO '$dbuser'@'localhost'
> > IDENTIFIED BY
> > '$userpasswd'"
> >
> > --
> > Melvyn
>
> Something I've wondered is why the default location for the MySQL databasi
> is /var/db/mysql? Yes /var/db seems to make sense, but most /var
> filesystems would be fairly small.
By tradition /var is for 'variable data'.
By tradition, /var has been used for mail and news and as such do not require
large partitions unless you run binary newsgroups. Therefore most /var
partitions are small.
However - I agree that the chosen default is not up-to-par with the use of
MySQL, especially since you would take smaller fragment size for a /var
partition if you have a busy mail- or newsserver and that certainly won't
benefit MySQL.
> Is it generally common practice to create a symbolic link to somewhere on,
> say, /usr to store the databasi?
If you know beforehand that you're going to run a mysql database with large
databases (or use innodb which will never shrink!), than it's wise to create
a large partition /var/db/mysql on boot.
Otherwise you can set the DB_DIR variable during installation of MySQL to
f.e.:
/usr/local/var/mysql
which is not unheard of. On my workstation I use /usr/db/mysql, but on my
workstation I also have a 15G /usr partition.
Whichever you choose, it's best to choose a DB_DIR ending in /mysql, so you
can always decide to add another disk and mount that as $DB_DIR.
By the way: don't underestimate the size of the binary logs, especially with
large inserts.
-- Melvyn ======================================================= FreeBSD sarevok.webteckies.org 5.2-BETA FreeBSD 5.2-BETA #1: Sat Nov 29 00:15:33 CET 2003 root@sarevok.webteckies.org:/usr/obj/usr/src/sys/ SAREVOK_NOFW_DBG i386 =======================================================
- application/pgp-signature attachment: signature
- Previous message: Lee Harr: "re: mplayer problem"
- In reply to: DG: "RE: MySQL question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Need Help setting up Mysql on Openserver 6.0
... > mysql> status ... > Server characterset: latin1 ...
to make the proper selection during installation. ... was installed first in partition
1 and 6.0 was later installed in partition 2) ... (comp.unix.sco.misc) - Re: handling mysql binlog data
... I only wonder now how to set up a cron job to do it on a permanent basis? ...
1/ I would probably be better off setting this mysql query in a separate file an run it from cron?
... Thank you anyway - this was very helpful and I instantly saved a lot of space on a shrinking
/var partition! ... database files (preserving the appropriate ownership and ...
(freebsd-questions) - Re: handling mysql binlog data
... Shrinking /var partition?: I found the ports setup of mysql to ...
If an upgrade uses a supplied script to alter the installation ... (freebsd-questions) - Re: handling mysql binlog data
... Shrinking /var partition?: I found the ports setup of mysql to ...
database files (preserving the appropriate ownership and ... (freebsd-questions)