Upgrading to MySQL 5.0.45 on RHEL and CentOS

July 18, 2007 by · 26 Comments 

As happens every 2 months or so, the community release of MySQL has been updated. The 5.0.45 release contains a substantial number of bug fixes since the last community release (5.0.41) but perhaps more interestingly, there were about 100 bug fixes since the last Enterprise release (5.0.44) just two weeks prior! This is definitely a release that I'd recommend all users of MySQL 5.0 upgrade to.

While MySQL does provide binary RPMs for RHEL & CentOS for their community releases, the binaries provided are not packaged in the same format as those that ship with RHEL, CentOS and Fedora. For those that want to stick with the "Red Hat"-style packages, add my yum repository to your system and run a "yum update".

For those that don't want to update other packages on their system (httpd, php, etc.), or for some reason feel like blowing a couple hours of free time, the src.rpm I used for building these packages is below. Just remember, your compile will fail if you try to build as 'root', so make sure that you've got a non-root build environment configured...

MySQL 5.0.45 Release Notes

Update (9/24/2009): Packages deleted, use the yum repository instead.

Comments

26 Responses to “Upgrading to MySQL 5.0.45 on RHEL and CentOS”
  1. Slappy says:

    Jason: Just wanted to again express my appreciation for your updates and add a comment on how I resolved my upgrade issues using your repository, following up on my comments in the MySQL 5.0.44 page, so that, if anyone may be having similar problems, they may try what I used to make it work.

    As I reported I was having problems with mod_python stopping yum because of the dependency issues, arising from our having a later version of Python already installed. I finally came up with a string of yum commands that solved all my issues and which might be of some use to others, so I'm posting it here.

    What worked for me was: Yum update --exclude mod_python --exclude cups –exclude cups_libs

    This removed efforts to update the only two components of your repository which failed dependency issues with our installation, both of which were caused by our having a later version of mod_python and cups_libs. For anyone having problems of a similar nature, because of later versions of software already installed, check out the --exclude command. It can be a life saver. Thanks again for your efforts to assist the rest of us.

  2. ziggy says:

    OK, I'm entirely new to this game and Linux. I'm on a Centos VPS and found your site via google of course.

    --add my yum repository to your system

    How do I do that?

    Also, can you recommend a website where I can post my mysql environment and get some help tuning it? I'm on 5.0.37 but for some reason have_innodb is disabled and I can't seem to get it going (tried sticking have_innodb=yes in the my.cnf but didn't work on restart, though not sure what bracketed variable it goes under in that file.) and the cnf is extremely short though I'd thought it would be long, so imagine I have some work to do.

    Finally, my friend in Vietnam said your site blocks his country. He wondered why.

  3. Slappy says:

    ziggy:

    You will find the instructions for adding Jason's repo on the main page of the "yum repository" link at the top of this page.

    "For those of you using CentOS, or those that have installed ‘yum’ on RHEL, type:

    nano -w /etc/yum.repos.d/utterramblings.repo

    … and then paste the following into the editor:

    [utterramblings]
    name=Jason’s Utter Ramblings Repo
    baseurl=http://www.jasonlitka.com/media/EL4/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka"

  4. Jason says:

    @ziggy,

    Slappy already answered your question about using my yum repo. If you need more information then you should click the "Yum Repository" link at the top of the page (which takes you to http://www.jasonlitka.com/yum-repository/).

    As to optimizing your MySQL config, if you have a license for vBulletin then there is a sub-forum on their company forums dedicated to server optimization (where I chime in from time to time). If not, you might try asking at http://www.webhostingtalk.com/ or contracting the guys who run http://www.mysqlperformanceblog.com/. If InnoDB isn't working then you may have "skip-innodb" in your my.cnf. If that isn't true, your build may not have InnoDB compiled in.

    Finally, regarding your friend in Vietnam, that is unfortunate. I don't want to turn away any visitors but a few months back I had a real problem with someone copying entire articles from my site and passing them off as his own. While it is expected that some content theft may occur with the articles of a larger site, it can be a death sentence for a new one.

    This person was located in Vietnam and, unfortunately, since I couldn't determine exactly which visitor from that country was doing it, I was forced to block everyone. This person's site has since been removed from Technorati and Google so it may be that he closed up shop. I'll think about it over the weekend and we'll see, I may remove the block on Monday. In any case, you can find more information on the subject at the links below.

    http://www.jasonlitka.com/2007/04/11/to-the-jerk-stealing-my-content/
    http://www.jasonlitka.com/2007/04/16/wordpress-plugin-block-countries/

  5. John says:

    Jason, I am interested in working with you on some php packages with oracle linkage. i will do the work but I need some help. Please email me if interested.

  6. Michael says:

    Any particular reason you spec'd without --with-ndbcluster added in?

  7. Jason says:

    @John,

    What exactly is the problem you're having?

    @Michael,

    The packages I build are built in what I call the "Red Hat style" used by RHEL, CentOS, and Fedora. I do not believe that those are built with the ndbcluster option either.

  8. Michael says:

    Jason,

    I see, ok, well, I've modified your .spec to build in ndbcluster support and generate the support rpms (storage,mgmt,extra).

    I'm more than happy to provide a copy of it to you if you want them for your repository.

    Michael

  9. Jason says:

    Did you set it up so that the ndbcluster functionality is isolated and contained in a separate RPM? If so, yeah, I'd be interested in the spec file for future versions.

  10. Michael says:

    Yes, functionality is split into seperate rpms, although you may want to look it over as I was having an issue with _libdirexec - it works interally for me because we can manage around it, however distribution is another issue entirely.

    http://www.netdesign.com/~michael/mysql-ndb.spec

  11. Michael says:

    Actually, I've added to that file, I found a build error on the latest iteration, url is the same, build is now correct.

  12. Mark Richards says:

    Jason,

    I find that working on dependency issues is similar to doing a "small fix" to a home. "Let's replace that window", I say to my wife. Weeks later we are replacing the entire wall. 🙂

    So this is what I hit today when tracking down why my utterramblings LAMP installation (on CENTOS4) was having a php problem with Libxml2 ($dom = new DOMDocument('1.0', 'iso-8859-1'); was triggering an error indicating DOMDocument was not supported). So in process ran a yum upgrade and found a ton of stuff that needed to be done (the automatic updates must have been failing for a while). That's because I see this at the end of yum upgrade:
    ...
    --> Restarting Dependency Resolution with new changes.
    --> Populating transaction set with selected packages. Please wait.
    ---> Package perl-Net-SSLeay.x86_64 0:1.30-4.el4.centos set to be updated
    ---> Package perl-Net-Daemon.noarch 0:0.43-1.fc6.rf set to be updated
    --> Running transaction check
    --> Processing Dependency: perl(Win32::ODBC) for package: perl-DBI
    --> Finished Dependency Resolution
    Error: Missing Dependency: perl(Win32::ODBC) is needed by package perl-DBI

    Now I have no need for ODBC but it's tied into all the php/mysql stuff. Plus this dependency is preventing YUM from working properly.

    So I made sure I have DBI installed. It's:

    [[email protected] ~]# rpm -qa | grep DBI
    perl-DBI-1.53-2.el4s1

    Yet this still fails.

    I uninstalled all my LAMP stuff and then reinstalled (which removed and then brought in perl-DBI) but still I see this problem.

    Later I'll get back to the XML2 issue, but now this seems like a much bigger issue.

    Any thoughts?

  13. Jason says:

    @Mark,

    My binaries are designed to work with the libraries available in the EL4 "base" and "updates" repos. If you are using newer files from somewhere else (which it seems you are, the newest version of "perl-DBI" available is 1.40-8 and one of those packages you installed was tagged "FC6") then it's really difficult to predict what will happen.

    I would suggest removing all of the "extra" packages you've installed, along with whatever repos installed them, and then starting over.

  14. Mark Richards says:

    Jason, thank you for replying so soon and with good advice.

    Problems solved (somewhat.. read on).

    The question I have now is how to avoid problems with the LAMP stuff from your repository when updates are done nightly on the server. Any suggestions on this? For now I have disabled dries and dag, but also may need to disable centos which doesn't make sense, really.

    Here are the steps:

    First, I removed mysql so that the dependency failure wouldn't kick in. Then I completed the overall update of the server (over 200 files). This went off without a hitch.

    The rest was complicated. I'm documenting the steps here so that others may avoid them or at least if they go down this road, be able to dig their way out!

    I removed

    yum remove perl-Net-Daemon.noarch

    then did a
    yum update perl-Net-Daemon.noarch

    and found that it was getting its file from dries

    So disabled dag and dries

    then

    yum --disablerepo=centosplus install mysql

    It would have installed perfectly but not for this:

    Transaction Check Error: file /etc/my.cnf from install of mysql-5.0.45-jason.1
    conflicts with file from package mysql-libs-5.0.46-1.el4.centos

    So...

    yum --disablerepo=centosplus remove mysql-libs

    which remove php-mysql as well.

    Then

    yum --disablerepo=centosplus install mysql

    worked perfectly followed by

    yum --disablerepo=centosplus install php-mysql

    which also worked perfectly, followed by

    yum --disablerepo=centosplus install mysql-server

    and we have a good set.

    Except that my /etc/rc.d/init.d/mysqld file is missing and it looks like the mysql.cnf file is gone.

    So I had to

    yum remove mysqlclient14.x86_64
    yum remove mysql.i386

    and then

    yum --disablerepo=centosplus install mysql-server

    and all is back where it should be:

    mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0

    php --version

    PHP 5.2.3 (cli) (built: Jun 18 2007 17:59:58)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.0, Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, by Derick Rethans

    apachectl -v
    Server version: Apache/2.2.4 (Unix)
    Server built: Mar 17 2007 11:36:08

    --

  15. Jason says:

    @Mark,

    Yeah, it's generally best to not have multiple repos that provide the same packages. When you do you tend to see things like this crop up. That is one of the reasons for the "protectbase" and "priority" plugins for yum.

  16. Mark Richards says:

    Now to my first question (and hopefully this will not lead me back to ripping out the wall again)...

    it seems that XML2 is not part of the php package:

    $dom = new DOMDocument('1.0', 'iso-8859-1');

    ( ! ) Fatal error: Class 'DOMDocument' not found in maintain_sites.php on line 206
    Call Stack
    # Time Memory Function Location
    1 0.0036 475496 {main}( ) ../maintain_sites.php:0

    phpinfo() says:

    PHP Version 5.2.3

    System Linux solni.solarwave.net 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27 09:40:21 EST 2007 x86_64
    Build Date Jun 18 2007 18:03:49
    Configure Command './configure' '--host=x86_64-redhat-linux-gnu' '--build=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json'

    Maybe I need to do a manual install after all this?

  17. Jason says:

    @Mark,

    Do you have the 'php-xml' package installed?

  18. Mark Richards says:

    >>Do you have the ‘php-xml’ package installed?
    > gulp

  19. Mark Richards says:

    HTML truncated previous message.

    Installing:
    php-xml x86_64 5.2.3-jason.2 utterramblings 330 k

    I do now.

    Thanks Jason.

    /m

  20. Jesse says:

    Newer version has been out...
    http://dev.mysql.com/doc/refman/5.0/en/releasenotes-es-5-0-46.html

    Looks like http://dev.mysql.com/doc/refman/5.0/en/releasenotes-es-5-0-48.html will probably be coming out soon since 46 was July 13th.

  21. Jason says:

    @Jesse,

    Yes, I noticed that a few days ago. I've got 32-bit packages built but I've been working with the spec file for the ndb components modified by Michael so they haven't been released yet. I'll probably kick out non-ndb 32- & 64-bit packages tomorrow and keep playing with the cluster components for another couple days.

  22. Lance Baker says:

    Thank You So Much 🙂

    You guys are legends!

    Thanks Again.

  23. leonart says:

    Hi Jason ... help my 🙁

    ransaction Check Error:
    file /usr/share/man/man1/mysql_config.1.gz from install of mysql-server-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/pcregrep.1.gz from install of pcre-7.6-jason.1 conflicts with file from package pcre-6.6-2.el5_1.7
    file /usr/share/man/man1/pcretest.1.gz from install of pcre-7.6-jason.1 conflicts with file from package pcre-6.6-2.el5_1.7
    file /etc/my.cnf from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/bin/mysql_tableinfo from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/info/mysql.info.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/my_print_defaults.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysql.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysql_tableinfo.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysqldump.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/ascii.xml from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/english/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/french/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/german/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-5.0.58-jason.2 conflicts with file from package mysql-5.0.45-7.el5

  24. leonart says:

    and wanted separately to say enormous thank you for php 5.2.6

  25. leonart says:

    I am sorry forgot to write my version CentOS_5.2_Final

  26. Tracer Lee says:

    I have the same issue as you, did you everget an answer?

This site is no longer updated. If you have a need for RHEL/CentOS LAMP Stack updates outside the normal channels, I recommend ART. https://updates.atomicorp.com/channels/