RPMS for MySQL version 4: Solved!?!

Steven J. Norton yellowdog-general@lists.terrasoftsolutions.com
Wed, 18 Aug 2004 10:12:32 -0400


Dr. Wright (and everyone else who helped) --

I've also had success installing MySQL version 4 using the methods outlined
below. I'm just glad that I could get advice from much more Linux-aware
folks out there, or else I'd be stuck. I did have to reboot my machine to
get everything working right, but after the reboot everything went smoothly
--even the init.d entry for startup on boot was updated with the correct
information (and I even had enough confidence to update MySQL on my
production server). The only hitch is that yum doesn't seem to realize MySQL
is installed.

Thanks again to all!

  -- Steve Norton

on 8/10/2004 12:08 AM, John M. Wright wrote:

> 
> After spending a ridiculous amount of time over the past few days
> hacking at this problem, I have found a solution (worked for me, anyway).
> 
> After building the MySQL-4.0.20 RPMs from the SRPM (downloaded from
> mysql.com) with rpmbuild -bb, I found, in the BUILD/mysql-4.0.20/support-files
> directory, a specfile: MySQL-shared-compat.spec, which according to its
> comment lines was intended to simply repackage two existing MySQL-shared
> RPMs into a single MySQL-shared-compat RPM.  I copied this spec file into
> SPECS and edited it as follows.
> 
> Firstly, my existing YDL 3.01 mysql installation didn't include a
> separate mysql-shared RPM; instead, the libmysqlclient.so.10 was included
> in the mysql-3.23.54a-4.ppc.rpm.  Accordingly, I altered two of the spec
> file version and Source lines as follows:
> 
> %define version3 3.23.56
> was changed to:
> %define version3 3.23.54a
> 
> and
> 
> Source1:      MySQL-shared-%{version3}-1.%{_arch}.rpm
> was changed to:
> Source1:      mysql-%{version3}-4.ppc.rpm
> 
> Then, since the lib directories are slightly different for MySQL 4 and
> 3.23, the following line in %files was added; immediately after the line:
> 
> %{_libdir}/libmysqlclient*
> 
> I added the line:
> 
> %{_libdir}/mysql/libmysqlclient*
> 
> And finally, I copied mysql-3.23.54a-4.ppc.rpm and MySQL-shared-4.0.20.ppc.rpm
> to the SOURCES directory. After this, rpmbuild -bb MySQL-shared-compat.spec
> resulted in the generation of a MySQL-shared-compat-4.0.20-0.ppc.rpm
> which actually contained both the so.10 and so.12 libmysqlclient files,
> and which allowed rpm -Uvh MySQL* to update the mysql package(s) without
> breaking any dependencies.  For some reason, I had to kill -9 the mysqld
> process (twice), and re-start it with /etc/init.d/mysqld start, but after
> that it has seemed to work fine.  I did not encounter an ld-linux.so
> dependencies.
> 
> I now know a tad more about .spec files than I knew before (or ever wanted
> to know, truth be known).  The final result is not so bad; copy a spec
> file into SPECS, edit two lines and add a third, copy a couple of binary
> rpms into SOURCES, and you're off.  But Oh! the tortuous path, full of
> blind alleys, that I took to arrive there; I hope this saves someone
> else from having to repeat the journey.
> 
> John Wright