NYCPHP Meetup

NYPHP.org

[nycphp-talk] pre MySQL upgrade sanity check

David Mintz dmintz at panix.com
Wed Jul 16 15:34:58 EDT 2003


Thanks Hans for your unfailing helpfulness (perhaps combined with a
self-interested quest for entertainment to ease the boredom of your
training course (-: ?)

I can feel my heart rate picking up, that surely means I'm gonna do it.
Who needs hard drugs when we have this stuff? Woo hoooo!

	David



On Wed, 16 Jul 2003, Hans Zaunere wrote:

>
> As I sit at an IIS training course...
>
> > 1) shut down mysql and httpd
> >
> > 2) I have Mysql client and server installed as RedHat RPMs. Remove these
> > with rpm --erase ... after backing up data.
> >
> > 3) install MySQL according to
> > http://www.mysql.com/doc/en/Installing_binary.html including
> > post-installation setup
> >
> > 4) rebuild PHP with ./configure --prefix=/usr/local
> > --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
> > [--with-other-stuff etc]
>
> I always install php into /usr/local/php which can be handy if you have
> multiple installs (for instance, I have distinct DSO and CLI compiles) but this
> is of course just a preferance.  I also like to use the php.ini-recommended
> file, so:  cp PHPSRC/php.ini-
> recommended /where/you/installed/to/php/lib/php.ini  (or something like that)
>
> > followed by make; make install
> >
> > 5) my httpd.conf has been working fine; leave it alone
> >
> > 6) restart httpd and mysql
> >
> > 7) crack open a beer
>
> Yes, #7 is vital.  Something else you may want to consider:  since it's
> a "considerable" upgrade from MySQL 3.x to 4.x, I'm always most comfortable
> rebuilding the databases/tables in 4.x (especially if they aren't that big).
> This may just be paranoia, but at a minimum you'll get slightly optimized
> tables.  There are a couple ways of doing this; here's one that I liked:
>
> mysqldump -u 'theuser' -p 'thepassword' --quick --allow-keywords -h thehost.com
> db1 table1 | mysql -u 'root' -p 'passwd' --database=db1new
>
> There are of course variations on the theme, from doing multiple DBs, to
> tables, users, etc.
>


---
David Mintz
http://davidmintz.org/
Email: See http://dmintzweb.com/whitelist.php first!

     "You want me to pour the beer, Frank?"



More information about the talk mailing list