From owner-freebsd-questions@FreeBSD.ORG Fri Aug 29 02:04:09 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 ED0A716A4BF for ; Fri, 29 Aug 2003 02:04:09 -0700 (PDT) Received: from mail.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2557A43FB1 for ; Fri, 29 Aug 2003 02:04:09 -0700 (PDT) (envelope-from freebsd@soith.com) Received: from www.fastmail.fm (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 9573514E099; Fri, 29 Aug 2003 05:04:07 -0400 (EDT) Received: from 10.202.2.132 ([10.202.2.132] helo=www.fastmail.fm) by messagingengine.com with SMTP; Fri, 29 Aug 2003 05:04:07 -0400 Received: by www.fastmail.fm (Postfix, from userid 99) id 5330C39FD6; Fri, 29 Aug 2003 05:04:07 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Aaron Wohl" To: "Jez Hancock" , freebsd-questions@FreeBSD.ORG Date: Fri, 29 Aug 2003 03:04:07 -0600 X-Epoch: 1062147847 X-Sasl-enc: rIQ8b1syEsm2nZ7DyFvAZQ References: <20030829083316.GA130@users.munk.nu> In-Reply-To: <20030829083316.GA130@users.munk.nu> Message-Id: <20030829090407.5330C39FD6@www.fastmail.fm> Subject: Re: MYSQL Fresh Reinstall, How? 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, 29 Aug 2003 09:04:10 -0000 If you rm -rf /var/db/msyql then reinstall it doesnt work right now is the problem... at least on freebsd. It gives the host.frm error the poster asked about. Ive only been able to get a new system going by restoring the mysql database (/var/db/mysql/mysql) from elsewhere. On Fri, 29 Aug 2003 09:33:16 +0100, "Jez Hancock" said: > On Fri, Aug 29, 2003 at 02:52:56AM -0400, Ben Dover wrote: > > I managed to mess up my MYSQL4.1 on my 5.1 box and I can't seem to get it > > straightened out. I think the best way to resolve this would be to do a > > fresh install of MYSQL server. I did a pkg_delete of MYSQL-server and > > client and installed again from ports but I'm getting the same error > > messages. Is there a way to just start out fresh like I never had MYSQL > > installed in the first place? The error I'm getting is: > > 030829 2:36:36 Fatal error: Can't open privilege tables: Can't find file: > > './mysql/host.frm' (errno: 13) > > 030829 02:36:36 mysqld ended > As the previous poster said you should first try restoring your mysql > tables (the mysql database particularly '/var/db/mysql/' and it's > children since it's the host.frm db file that's screwing up). > > If you're not too bothered about losing the data in your mysql db then > you can just simply move the mysql db files totally: > > mv /var/db/mysql /var/db/mysql.bak > > and then reinstall from scratch (deinstall first if you haven't already, > it'll complain but should succeed). > > You could then copy across the dbs from /var/db/mysql.bak back into > /var/db/mysql after the reinstall and then recreate the mysql users with > appropriate privs on the dbs. I _think_ this could work, but would be a > pain. > > The best thing to do would be to just restore your mysql db from backup > - you have those right!? (This was about the time when _I_ started to > do backups regularly after having a similar problem:) > > -- > Jez > > http://www.munk.nu/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"