From owner-freebsd-questions@FreeBSD.ORG Thu Jan 29 22:09:06 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 064FB16A4CE for ; Thu, 29 Jan 2004 22:09:06 -0800 (PST) Received: from 82-41-27-158.cable.ubr04.edin.blueyonder.co.uk (82-41-27-158.cable.ubr04.edin.blueyonder.co.uk [82.41.27.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C03D43D41 for ; Thu, 29 Jan 2004 22:09:04 -0800 (PST) (envelope-from andrew@mux.org.uk) Received: from mux.org.uk (spatula.flat [192.168.0.2]) by myriad.flat (Postfix) with ESMTP id 40DD6BA; Fri, 30 Jan 2004 05:00:36 +0000 (GMT) Message-ID: <4019F512.2060806@mux.org.uk> Date: Fri, 30 Jan 2004 06:09:22 +0000 From: Andrew Boothman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ecrist@adtechintegrated.com References: <200401292328.20454.ecrist@adtechintegrated.com> In-Reply-To: <200401292328.20454.ecrist@adtechintegrated.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: MySQL 4.x questions... 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, 30 Jan 2004 06:09:06 -0000 Eric F Crist wrote: > Hey all, > > I installed MySQL server 4.1.0_1 to support the PostNuke CMS and the phpBB > bulletin board system. For the life of me, I can't get a database setup for > either of them to use. Both users groups tell me that there's a mysql > problem with configuration. Here are the errors: > > phpBB: > > Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource > in /www/seccomp/htdocs/phpBB2/db/mysql4.php on line 330 > > Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource > in /www/seccomp/htdocs/phpBB2/db/mysql4.php on line 331 > phpBB : Critical Error > > Could not connect to the database > > PostNuke: > > No database made.Error connecting to db > Program: /www/seccomp/htdocs/pn/install/db.php - Line N.: 45 > Database: seccomp-nuke > Error (1044) : Access denied for user: '@localhost' to database > 'seccomp-nuke' > > Can someone tell me what I need to setup to get this working right? I've been > feeling pretty worthless with this stuff lately. I've never needed this much > help. Maybe I'm just trying to do too much at once? It's some kind of permissions problem. For some reason user accounts and permissions are surprisingly difficult to get right in MySQL. The fact that you get "Access denied for user" means that a connection is being opened, but that it couldn't be authenticated. You need to check the DB-related settings in your applications. Check you have supplied the correct usernames and passwords. Really - there's no substitute for seriously reading and digesting . There's a lot of information on there but it's really quite a complicated issue. The thing to look for is whether you've granted the correct rights to the correct user@host. Note that MySQL defines user@localhost and user@my.hostname to be different things. If I remember correctly, connecting using the unix socket (not the networking TCP socket) will show as @my.hostname while connecting to the TCP socket on 127.0.0.1 will show as @localhost. I find it difficult everytime I set up a new application using MySQL myself. But it is possible to get your head around it! Best of luck.