From owner-freebsd-questions@FreeBSD.ORG Thu Jan 22 09:19:37 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 E657916A4CE for ; Thu, 22 Jan 2004 09:19:36 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DC1443D1F for ; Thu, 22 Jan 2004 09:19:34 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i0MHJFse021852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jan 2004 17:19:15 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i0MHJF8a021810; Thu, 22 Jan 2004 17:19:15 GMT (envelope-from matthew) Date: Thu, 22 Jan 2004 17:19:15 +0000 From: Matthew Seaman To: Christer Solskogen Message-ID: <20040122171915.GB87994@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Christer Solskogen , questions@freebsd.org References: <4569.148.121.98.106.1074790312.squirrel@carebears.mine.nu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LyciRD1jyfeSSjG0" Content-Disposition: inline In-Reply-To: <4569.148.121.98.106.1074790312.squirrel@carebears.mine.nu> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.62 X-Spam-Checker-Version: SpamAssassin 2.62 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: questions@freebsd.org Subject: Re: upgrading mysql 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: Thu, 22 Jan 2004 17:19:37 -0000 --LyciRD1jyfeSSjG0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 22, 2004 at 05:51:52PM +0100, Christer Solskogen wrote: > It seems like some port i want to install depend on mysql4, but i have > some programs that depends on mysql-client-3.23.58_1 ( I also have > mysql-server-3.23.58_1 installed) >=20 > I was wondering upgrading the mysql ports to 4.x series. should this be o= kay? >=20 > gallery-1.4.1 ,p5-Mysql-modules-1.2219, php4-4.3.4_5, phpMyAdmin-2.5.4, > phpSysInfo-2.1 and squirrelmail-1.4.2_1 seems to like mysql-3, and i was > wondering if these ports will work with mysql4. Apart from gallery-1.4.1 and phpSysInfo-2.1 I have all of those working just fine with mysql-4.0.17. PHP will certainly link against any of the mysql versions available in ports, as will the perl DBI stuff and the MySQL JDBC interface. Anything that depends on those interfaces is therefore pretty much guarranteed to work. =20 > and if this works, how will be the correct way of upgrading the mysql > packages? Take a backup of your database contents and any my.cnf files, just in case. Deinstall the mysql-3.x ports, using the '-f' (force) option. This should not destroy the actual data files used by mysql, just remove the various binaries and documentation. Now install which ever mysql-4.x port you require. Use 'pkgdb -F' to convice the ports system that all ports which formerly depended on mysql-3 now depend on mysql-4. This should be able to read the mysql-3 datafiles directly, although it may do some internal modifications, so don't count on being able to downgrade so easily. Nb. Some of the internal privilege control tables are different in mysql-4: you should review all of your GRANTS within the mysql database after doing the upgrade. Although as the difference is that there are some new privileges added everything should work pretty much straight away. Finally, rebuild all of the ports that depend on mysql-client so that they link against the correct shared libraries: # portupgrade -fNr -x databases/mysql40-client databases/mysql40-client (assuming you want the production version -- mysql-4.0.17) Most ports that require MySQL connectivity will automatically adjust to use the version you have installed. 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 --LyciRD1jyfeSSjG0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD4DBQFAEAYTdtESqEQa7a0RAn0uAJjCFvkSMqCCIk8jKQpdHnKNohdXAJ4wsdb7 u6JTMH+Q3IZElGnUnGYSZQ== =CMTb -----END PGP SIGNATURE----- --LyciRD1jyfeSSjG0--