From owner-freebsd-questions@FreeBSD.ORG Fri Sep 3 13:43:02 2004 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 D810516A4CF for ; Fri, 3 Sep 2004 13:43:02 +0000 (GMT) Received: from destiny.chrononomicon.com (mail.chrononomicon.com [65.193.73.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EB7143D58 for ; Fri, 3 Sep 2004 13:43:02 +0000 (GMT) (envelope-from bsilver@chrononomicon.com) Received: from [127.0.0.1] (destiny.chrononomicon.com [192.168.1.42]) by destiny.chrononomicon.com (Postfix) with ESMTP id DE3E51FE26 for ; Fri, 3 Sep 2004 09:42:35 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: <1D64B3BF-FDAF-11D8-ABDA-000D9338770A@chrononomicon.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-questions@freebsd.org From: Bart Silverstrim Date: Fri, 3 Sep 2004 09:42:36 -0400 X-Mailer: Apple Mail (2.619) Subject: Moving MySQL database 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: Fri, 03 Sep 2004 13:43:03 -0000 I have a server that is rapidly filling the var partition with a MySQL database. I'd like to move it to a subdirectory somewhere under /usr. Is there a document that would outline a "best practices" approach to doing this? My first instinct was to stop the mysqld, do a mv on /var/db to /var/db2 to rename it, copy the data to a /usr/local/db folder and alter permissions on it to match /var/db, then make a softlink between /usr/local/db and /var/db and restart mysqld so mysqld wouldn't need any reconfiguring and everything, I would *think*, should keep working...only now it will be working off a far more spacious partition. Thanks, -Bart