[rhn-users] Upgrading MySQL

Michael Grice grice at berbee.com
Fri Jan 21 15:24:52 UTC 2005


* nathan r. hruby <nhruby at uga.edu> [050121 07:20] wrote:
> On Thu, 20 Jan 2005, Ted Pennings wrote:
> 
> 
> >Can anyone offer any suggestions about how to upgrade the rpm? An hour or 
> >two downtime is acceptable and I will do a full mysqldump before starting 
> >in case anything goes wrong.
> >
> 
> This is slightly more troublesome than you think.
> 
> First you need to build MySQL-4 (the MySQL source RPM's build fine), then
> you'll need to rebuild php against the MySQL-4 you just installed.  After
> that, you'll need to rebuild (or remove) anything else that is linked
> against MySQL-4 on your system.  Most of this can be done before a
> downtime by building RPM packages on a seperate machine for installation
> later.  IIRC, there was a thread on this on the taroon-list, the archives
> should reveal it.
> 
> After that you'll need to reimport the your databases and probably run
> some of the scripts to update the permissions tables in the MySQL db
> (assuming you're not using InnoDB or BerkleyDB tables.. I don't know about
> those).  MySQL's documentation covers upgrades from 3.23.xx to 4.0 and 4.1
> in details, I'd suggest reading that too, I've found it helpful when I
> approached this same issue.
> 
> All of this is easier, IMHO, that using a while loop with in_array() though,
> so it's probably worth it :)

Ted, this looks pretty reasonable. If at all possible, though, I would
recommend doing it on another box first (and taking very good notes).
It's more work, but it can save you down time.

As Nathan says, it's a bit trickier than you might like. Depending on
how what extensions you need (use phpinfo() to find out how Red Hat
compiled it), PHP can be difficult to compile. 

It's true that I usually wind up compiling it with something odd (no
longer supported extensions, support for three different databases, etc.).
But trust me--you don't want to be up at 3 AM googling for some library
you didn't know you needed before compiling PHP for the eighth time.  
--Michael




More information about the rhn-users mailing list