I have a problem with an easy way to install MySQL via rpm without resorting to specifying the exact point release of MySQL. Presently my local yum repository has versions of 5.0, 5.1,5.4 and 5.5.
If I want to install MySQL Sever, I can just run:
$ sudo yum install -y MySQL-server Setting up Install Process Package MySQL-server-community-5.5.0-1.rhel5.x86_64 already installed and latest version Nothing to do
The issue here is the most current version is installed. If I want to install the most current version of 5.1 for example, I have found no way to specify MySQL-server-5.1, or MySQL-server-community-5.1, I have to specify the point release MySQL-server-community-5.1.40
I suspect there is some internal aliasing that may be possible within rpm’s to support this. I’m seeking help from any rpm experts and would appreciate any feedback.
My current products include:
$ sudo yum list MySQL-server-community Installed Packages MySQL-server-community.x86_64 5.5.0-1.rhel5 installed Available Packages MySQL-server-community.x86_64 5.0.82-0.rhel5 mydb-rhel5-server-x86_64 MySQL-server-community.x86_64 5.0.82-0.rhel5 mydb-rhel5-x86_64 MySQL-server-community.x86_64 5.1.40-0.rhel5 mydb-rhel5-server-x86_64 MySQL-server-community.x86_64 5.1.40-0.rhel5 mydb-rhel5-x86_64 MySQL-server-community.x86_64 5.4.3-0.rhel5 mydb-rhel5-server-x86_64 MySQL-server-community.x86_64 5.4.3-0.rhel5 mydb-rhel5-x86_64 MySQL-server-community.x86_64 5.5.0-1.rhel5 mydb-rhel5-server-x86_64 MySQL-server-community.x86_64 5.5.0-1.rhel5 mydb-rhel5-x86_64
Hi Ronald! The problem is that the package name is identical for all packages, so RPM just looks at the version number to determine which version to install. By default, it goes for the biggest version/build number. You usually have to force it to downgrade to a previous version number instead. The only way to work around this would be to change the name of the package itself to include the version number. For example MySQL Server 5.5.x would become “MySQL-server-community-55″ and would have to “provide” “MySQL-server-community”. For 5.1.x, the package name would be “MySQL-server-community-51″ respectively. This practice of adding part of the version number to the package name is sometimes used for being able to install different versions of shared libraries.