From owner-freebsd-questions@FreeBSD.ORG Wed Jul 14 10:05:42 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 3C84516A4F4 for ; Wed, 14 Jul 2004 10:05:42 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64E1643D3F for ; Wed, 14 Jul 2004 10:05:41 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i6EA5a4B017319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Jul 2004 11:05:36 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i6EA5a4K017318; Wed, 14 Jul 2004 11:05:36 +0100 (BST) (envelope-from matthew) Date: Wed, 14 Jul 2004 11:05:36 +0100 From: Matthew Seaman To: Jon Lyons Message-ID: <20040714100536.GB71531@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Jon Lyons , freebsd-questions@freebsd.org References: <20040713214819.4257.qmail@web60806.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GRPZ8SYKNexpdSJ7" Content-Disposition: inline In-Reply-To: <20040713214819.4257.qmail@web60806.mail.yahoo.com> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.5.3 (smtp.infracaninophile.co.uk [0.0.0.0]); Wed, 14 Jul 2004 11:05:36 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040705, clamav-milter version 0.74a on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Mysql Client and Freebsd 5.2-RELEASE 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: Wed, 14 Jul 2004 10:05:42 -0000 --GRPZ8SYKNexpdSJ7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 13, 2004 at 02:48:19PM -0700, Jon Lyons wrote: > I've been trying without success to get the mysql > client(any version) built from ports collection to > connect to a remote mysql server, get "Lost connection > to MySQL server". I've read the mysql site, google, > but it's only a problem on my 5.2 machine. Locally the > client works fine, and other machines are able to > access the server. On my Freebsd 4.8 machine built > with the same verion/port the connection works fine. > It's not a mysql permessions problem/network problem. > Has anybody got the client to function correctly on > Freebsd 5.2? 5.2-RELEASE had some killer bugs. I'd upgrade to 5.2.1-RELEASE if I were you -- or even better, track the RELENG_5_2 branch via cvsup(1). =20 > Btw, I've built a generic 4.8 machine and the client > works, then rebuilt the same machine with 5.2 and it > doesn't.... >=20 >=20 >=20 > nagios-new# mysql -h 10.128.18.202 -u monty -p > Enter password: > Welcome to the MySQL monitor. Commands end with ; or > \g. > Your MySQL connection id is 216 to server version: > 4.1.0-alpha >=20 > Type 'help;' or '\h' for help. Type '\c' to clear the > buffer. >=20 > mysql> use nagios; > ERROR 2013 (HY000): Lost connection to MySQL server > during query >=20 Seeing that you can establish the connection in the first place means that your configuration is probably correct. I'd look elsewhere than MySQL to try and work out what the problem is. Two possibilities spring to mind: 1) Faulty NIC or network cabling: if you're getting a lot of dropped packets it could cause the symptoms shown. Try ping(8)'ing the MySQL server from the box in question and see if you get any packet drops. Play with the '-s' (packet size) option to ping -- sometimes only larger packets may trigger problems. Also look at the output of 'netstat -i' -- any significant numbers in the Ierrs or Oerrs columns are a bad sign. Do make sure all of the network cables are correctly plugged into their sockets -- the only thing worse than discovering that is the problem is discovering it after you've spent a week trying all sorts of esoteric means to fix it... 2) A firewall somewhere between server and client is being far too eager to drop an established TCP connection. Server and client should send occasional 'keepalive' packets over an idle connection which will help prevent that. I'm not so much in favour of this explanation, as it looks as if the disconnect occurs immediately after you log in, and it would take a pretty pessimally designed firewall to do something like that. The other question is "why are you running an alpha version of MySQL on your server?" MySQL's 4.1.x series is up to 4.1.3-beta nowadays, as are the databases/mysql41-* ports. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --GRPZ8SYKNexpdSJ7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA9QVwiD657aJF7eIRAsFNAKC2b/RziSG0DdHszA9mKGqJETDwOACgllIu A8ojDvvIpUR/A9Tx0t6GLPE= =i53K -----END PGP SIGNATURE----- --GRPZ8SYKNexpdSJ7--