From owner-freebsd-questions@FreeBSD.ORG Sun Nov 30 14:27:59 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B779A16A4CE for ; Sun, 30 Nov 2003 14:27:59 -0800 (PST) Received: from morpheus.webteckies.org (node123e0.a2000.nl [24.132.35.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9541143FA3 for ; Sun, 30 Nov 2003 14:27:58 -0800 (PST) (envelope-from freebsd-questions@webteckies.org) Received: from sarevok.idg.nl (unknown [192.168.1.12]) by morpheus.webteckies.org (Postfix) with ESMTP id 1422D107C6; Sun, 30 Nov 2003 23:24:39 +0100 (CET) From: Melvyn Sopacua Organization: WebTeckies.org To: "'FreeBSD-questions'" Date: Sun, 30 Nov 2003 23:27:55 +0100 User-Agent: KMail/1.5.93 References: <002b01c3b78c$f37a2a40$5401a8c0@borg.fielden.com.au> In-Reply-To: <002b01c3b78c$f37a2a40$5401a8c0@borg.fielden.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_s7my/y4gnr9rgtV"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200311302327.56533.freebsd-questions@webteckies.org> cc: DG Subject: Re: MySQL question... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2003 22:27:59 -0000 --Boundary-02=_s7my/y4gnr9rgtV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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... > > > > > 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 requi= re=20 large partitions unless you run binary newsgroups. Therefore most /var=20 partitions are small. However - I agree that the chosen default is not up-to-par with the use of= =20 MySQL, especially since you would take smaller fragment size for a /var=20 partition if you have a busy mail- or newsserver and that certainly won't=20 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= =20 databases (or use innodb which will never shrink!), than it's wise to creat= e=20 a large partition /var/db/mysql on boot. Otherwise you can set the DB_DIR variable during installation of MySQL to=20 f.e.: /usr/local/var/mysql which is not unheard of. On my workstation I use /usr/db/mysql, but on my=20 workstation I also have a 15G /usr partition. Whichever you choose, it's best to choose a DB_DIR ending in /mysql, so you= =20 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 wit= h=20 large inserts. =2D-=20 Melvyn =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =46reeBSD sarevok.webteckies.org 5.2-BETA FreeBSD 5.2-BETA #1: Sat Nov 29=20 00:15:33 CET 2003 root@sarevok.webteckies.org:/usr/obj/usr/src/sys/ SAREVOK_NOFW_DBG i386 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --Boundary-02=_s7my/y4gnr9rgtV Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/ym7sOv9JNmfFN5URAhcrAJ48sSaZUIxZGpsP1M9i3pC/IiSSpACeIJ7Z jP80c6oOoVmR84TJ2f+VCpA= =LC9C -----END PGP SIGNATURE----- --Boundary-02=_s7my/y4gnr9rgtV--