Date: Wed, 14 Jul 2004 11:05:36 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Jon Lyons <jlyons30@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: Mysql Client and Freebsd 5.2-RELEASE Message-ID: <20040714100536.GB71531@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040713214819.4257.qmail@web60806.mail.yahoo.com> References: <20040713214819.4257.qmail@web60806.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040714100536.GB71531>