upgrading mysql

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Jan 22 09:19:37 PST 2004


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)
> 
> I was wondering upgrading the mysql ports to 4.x series. should this be okay?
> 
> 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.
 
> 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

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040122/1a6907a6/attachment.bin


More information about the freebsd-questions mailing list