From owner-freebsd-questions@FreeBSD.ORG Fri Dec 10 21:44:04 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 5835E16A4CE for ; Fri, 10 Dec 2004 21:44:04 +0000 (GMT) Received: from lorna.circlesquared.com (host217-45-219-85.in-addr.btopenworld.com [217.45.219.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2C7D43D5A for ; Fri, 10 Dec 2004 21:43:14 +0000 (GMT) (envelope-from peter@circlesquared.com) Received: from [127.0.0.1] (localhost.circlesquared.com [127.0.0.1]) iBALhJ4G058079; Fri, 10 Dec 2004 21:43:20 GMT (envelope-from peter@circlesquared.com) Message-ID: <41BA1877.60203@circlesquared.com> Date: Fri, 10 Dec 2004 21:43:19 +0000 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jorn Argelo References: <20041209230429.M81198@wcborstel.nl> <20041210145930.M75908@wcborstel.nl> <20041210165849.M9090@wcborstel.nl> <20041210210712.M62103@wcborstel.nl> In-Reply-To: <20041210210712.M62103@wcborstel.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: John DeStefano cc: freebsd-questions@freebsd.org Subject: Re: mysql connect problems 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, 10 Dec 2004 21:44:04 -0000 Jorn Argelo wrote: > On Fri, 10 Dec 2004 14:13:40 -0500, John DeStefano wrote > >>On Fri, 10 Dec 2004 18:08:48 +0100, Jorn Argelo wrote: >> >>>>"select user, password, host from user;" on 'mysql' returned 3 'root' >>>>entries using 2 different passwords (localhost, %, and the actual >>>>host name), 2 anon entries (localhost and host name), 2 'mtuser' entries >>>>(one on localhost w/o pw, one on '%'), and one 'wikiuser' entry >>>>(localhost w/o pw). I changed the root passwords so they all use the >>>>same one, and changed the 'mtuser' entry that didn't have a password >>>>so its password matches that of the other entry. >>> >>>Have you issued the command similair like GRANT ALL PRIVILEGES ON *.* TO >>>'youruser@localhost'; >> >>Yes: I ran both of these commands as root: >>GRANT ALL ON wikidb.* TO wikiuser; >>GRANT ALL ON mtdb.* TO mtuser; >>FLUSH PRIVILEGES; > > > AFAIK you must type 'wikiuser@localhost' (including the quotes). If that > doesn't work, then I don't know it either. Perhaps somebody else on the list > has an idea? I have found it's best to connect to the database you want to grant the privileges on before issuing the GRANT command. This doesn't seem to be the way it's documented, but it works for me. You might also consider using passwords... mysql>\u wikidb mysql>GRANT ALL on wikidb.* to wikiuser@localhost IDENTIFIED BY 'password'; mysql>\u mtdb mysql>GRANT ALL on mtdb.* to mtuser@localhost IDENTIFIED BY 'password'; Peter. -- the circle squared network systems and software http://www.circlesquared.com