From owner-freebsd-questions@FreeBSD.ORG Tue Dec 1 02:43:14 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9213C106566B for ; Tue, 1 Dec 2009 02:43:14 +0000 (UTC) (envelope-from fbsd1@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id 76EDD8FC14 for ; Tue, 1 Dec 2009 02:43:14 +0000 (UTC) Received: from [10.0.10.3] ([202.69.172.43]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Nov 2009 18:43:12 -0800 Message-ID: <4B1482B5.8040808@a1poweruser.com> Date: Tue, 01 Dec 2009 10:43:01 +0800 From: Fbsd1 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Tim Judd References: <4B134C50.5050104@a1poweruser.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Dec 2009 02:43:14.0440 (UTC) FILETIME=[0790B080:01CA7230] X-Sender: fbsd1@a1poweruser.com Cc: FreeBSD Questions Subject: Re: 8.0 & MYSQL50 denying access to user root no password 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, 01 Dec 2009 02:43:14 -0000 Tim Judd wrote: > On 11/29/09, Fbsd1 wrote: >> For many releases of Freebsd going back to 4.3 I have all ways used the >> default mysql user root localhost with no password which has been the >> default. >> With 8.0/mysql-server-5.0.86 I am denied access now. >> The mysql manual still says the normal install defaults to allowing >> access to user root with no password are in effect. >> >> After a fresh clean install of mysql >> Tried mysqladmin -u root drop test to delete the test db. >> Received this msg >> connect to srver at localhost failed >> access denied for user 'root@localost (using password: no) >> This in not suppose to happen. > > > Two issues, mysqladmin tries to connect to the mysql server -- i see > in your message above it can't connect > if it can't connect, how can it authorize? Read the post again. says access denied not connection refused. > > > second, the undocumented mysql_install_db must be run to install the > default database. But if you run this as root, you should change > ownership of everything in /var/db/mysql to allow the mysql server > access to the files. > mysql_install_db is documented in the mysql manual. After re-reading the section about using mysql_install_db many times I finally saw my problem. mysql_install_db has to be run direct from the root command line. I was doing "script capture.console.msg.rpt and them running another script which had the mysql_install_db command buried in it. The mysql manual says mysql_install_db will hose up the user account table locking out all access. I rm -rf /var/db/mysql to delete the hosed up mysql user db and then ran mysql_install_db from the root command line and the default root/nopassword worked again. Thanks for your pointer as to where to look.