From owner-freebsd-questions@FreeBSD.ORG Fri Dec 10 17:08:31 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 E10E716A4D0 for ; Fri, 10 Dec 2004 17:08:30 +0000 (GMT) Received: from www.wcborstel.nl (wcborstel.demon.nl [82.161.134.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id B96D543D5A for ; Fri, 10 Dec 2004 17:08:29 +0000 (GMT) (envelope-from jorn@wcborstel.nl) Received: from localhost (localhost [127.0.0.1]) by www.wcborstel.nl (Postfix) with ESMTP id 4612D4393; Fri, 10 Dec 2004 18:08:49 +0100 (CET) Received: from www.wcborstel.nl ([127.0.0.1]) by localhost (www.wcborstel.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38435-03; Fri, 10 Dec 2004 18:08:48 +0100 (CET) Received: from www.wcborstel.nl (localhost [127.0.0.1]) by www.wcborstel.nl (Postfix) with ESMTP id 94EE1438E; Fri, 10 Dec 2004 18:08:48 +0100 (CET) From: "Jorn Argelo" To: John DeStefano Date: Fri, 10 Dec 2004 18:08:48 +0100 Message-Id: <20041210165849.M9090@wcborstel.nl> In-Reply-To: References: <20041209230429.M81198@wcborstel.nl> <20041210145930.M75908@wcborstel.nl> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 82.161.134.53 (jorn) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at mail.wcborstel.nl 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 17:08:31 -0000 On Fri, 10 Dec 2004 11:07:17 -0500, John DeStefano wrote > On Fri, 10 Dec 2004 16:09:20 +0100, Jorn Argelo wrote: > > You have to make sure that the user has access to login. Unless you are using > > this database on an important machine, you can always change the root password > > like this: > > > > set password = password("yournewpassword"); > > > > Like that, you won't have problems with permissions and such, but people who > > put security at a top priority will not like this method. > > I logged into mysql as root over a PuTTy/SSH connection and performed > this command, specifying a new password. But the result was "Query > OK, 0 rows affected (0.01 sec)". That is good, because you changed your password now :) > I believe this is because there are > multiple 'root' entries in the user table with different 'host' > values. I was able to change these values when I specified which > entry I wanted to change: > > mysql> UPDATE user SET password=PASSWORD(''new_password') > -> WHERE user='root' and host='host_entry'; > > > > Yes: I'm running 5.0.0-alpha (at least that's what I get back from > > > "mysqladmin -u root -p version"). So, do you recommend I try to > > > remove those extra root entries? > > > > It's probably the best thing not to touch anything regarding the MySQL > > configuration unless you're sure what you're doing. > > Are these extra root user entries in the mysql database, which I > believe I've entered myself while trying different solutions, > considered part of the MySQL configuration? Ah. I was not aware that you entered users yourself. Then you should delete the amends you made yourself. > > "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'; See http://dev.mysql.com/doc/mysql/en/GRANT.html for more info. > > 'mtuser' can not log in to mysql locally: > # mysql -u mtuser -p > Enter password: > ERROR 1045 (28000): Access denied for user: 'mtuser'@'localhost' > (Using password: YES) > > A similar error is returned by the Movable Type System Loader page > (which is to be expected, since he/she can't log in locally): > Access denied for user: 'mtuser'@'%' to database 'mtdb' at > /usr/www/mt-static/mt-load.cgi line 195. > > 'wikiuser' can log in to mysql locally, but the MediaWiki 1.3.8 > installation page reports it "Couldn't connect to database", no mater > whether I specify localhost, the actual host name, or leave the > 'MySQL server' field blank. >