From owner-freebsd-questions@FreeBSD.ORG Tue Mar 6 22:11:29 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C839016A404 for ; Tue, 6 Mar 2007 22:11:29 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 8124913C48D for ; Tue, 6 Mar 2007 22:11:19 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan@localhost [127.0.0.1]) by dan.emsphone.com (8.14.0/8.13.8) with ESMTP id l26MBDIU050184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 6 Mar 2007 16:11:13 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.0/8.14.0/Submit) id l26MBDq2050183; Tue, 6 Mar 2007 16:11:13 -0600 (CST) (envelope-from dan) Date: Tue, 6 Mar 2007 16:11:13 -0600 From: Dan Nelson To: Noah Message-ID: <20070306221113.GI86959@dan.emsphone.com> References: <45EDB82D.2040300@enabled.com> <45EDBBB5.7090600@alpha-tierchen.de> <45EDCBF6.6040704@enabled.com> <45EDD60B.2020006@unsane.co.uk> <45EDE08F.3080707@enabled.com> <20070306215038.GH86959@dan.emsphone.com> <45EDE354.8040508@enabled.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45EDE354.8040508@enabled.com> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.14 (2007-02-12) Cc: Vince Hoffman , =?utf-8?B?QmrDtnJuIEvDtm5pZw==?= , User Questions Subject: Re: upgraded 6.2 and mysql lost all privileges X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 22:11:29 -0000 In the last episode (Mar 06), Noah said: > okay you got me on the right track. > I can see mysql files in that directory. but mysql is not aware of the > users in the "user files" > > is there something that I need to tell to mysql to use those files to > reincorporate the mysql related users? > > # ls -l /var/db/mysql/mysql > total 648 > -rw-rw---- 1 mysql mysql 208 Mar 6 06:49 user.MYD > -rw-rw---- 1 mysql mysql 2048 Mar 6 06:49 user.MYI > -rw-rw---- 1 mysql mysql 10330 Mar 6 06:49 user.frm If you can log into mysql, does "select * from user" print anything? A 208-byte MYD file is only large enough for about four user records. If you had 15 in there before, they're gone. You'll probably want to restore your entire /var/db/mysql/mysql/ directory from a backup, then run mysql_fix_privilege_tables to bring the tables up to whatever version of mysql you're now running. -- Dan Nelson dnelson@allantgroup.com