1

I had Ubuntu 10.10 on my server and MySQL 5.1 version. But since i wanted to update the system, I installed a fresh version of Cent OS 6 only so I could install the latest version of MySQL. But after installing cent OS 6 I am trying to install Mysql now, and it shows Mysql 5.1 as the only available package.

Please help

2 Answers 2

1

You asked this similar question before about getting MySQL 5.5 and I answered it : I am getting an error while trying to download binary for mysql 5.5.11 (Please upvote it if it helped before)

Here is a script I use to get the latest MySQL 5.5 for RHEL6

HOWMANYBITS=64
WHATOS=6
BINARY_VERSION=000
if [ ${HOWMANYBITS} -eq 32 ] ; then BINARY_VERSION=i386   ; fi
if [ ${HOWMANYBITS} -eq 64 ] ; then BINARY_VERSION=x86_64 ; fi
MINOR_RELEASE=22
MYSQL_RELEASE=5.5.${MINOR_RELEASE}
OS_VERSION=000
if [ ${WHATOS} -eq 0 ] ; then OS_VERSION=linux2.6 ; fi
if [ ${WHATOS} -eq 5 ] ; then OS_VERSION=rhel5    ; fi
if [ ${WHATOS} -eq 6 ] ; then OS_VERSION=el6    ; fi
RELEASE_TAG=1
DEVEL__RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
SHARD2_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-compat-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
SHARED_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
CLIENT_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
SERVER_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
PERL_LOCATION=ftp://ftp.de.netclusive.de/pub/parallels/Plesk/Expand/2.3.1/packages
PERL_FILE=perl-DBI-1.53-2.fc7.x86_64.rpm
PERL_URL=${PERL_LOCATION}/${PERL_FILE}
cd
rm -rf MySQL5.5_Install
mkdir MySQL5.5_Install
cd MySQL5.5_Install
wget ${PERL_URL}
wget ${DEVEL__RPM}
wget ${SHARD2_RPM}
wget ${SHARED_RPM}
wget ${CLIENT_RPM}
wget ${SERVER_RPM}
ls -l

When you are satisfied with the downloads, then install them:

for RPM in `ls -lSr *.rpm | awk '{print $9}'` ; do rpm -Uvh --force ${RPM} ; done

Give it a Try !!!

I found the problem. For OS6, change i386 to i686 and the download works ...

[redwards@lw-lts-155 MySQL_5.5.22]$ HOWMANYBITS=32
[redwards@lw-lts-155 MySQL_5.5.22]$ WHATOS=6

MYSQL_INSTALL_FOLDER=MySQL_${MYSQL_RELEASE}
OS_VERSION=000
[redwards@lw-lts-155 MySQL_5.5.22]$ BINARY_VERSION=000
[redwards@lw-lts-155 MySQL_5.5.22]$ if [ ${HOWMANYBITS} -eq 32 ] ; then BINARY_VERSION=i686   ; fi
[redwards@lw-lts-155 MySQL_5.5.22]$ if [ ${HOWMANYBITS} -eq 64 ] ; then BINARY_VERSION=x86_64 ; fi
SERVER_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ MINOR_RELEASE=22
[redwards@lw-lts-155 MySQL_5.5.22]$ MYSQL_RELEASE=5.5.${MINOR_RELEASE}
[redwards@lw-lts-155 MySQL_5.5.22]$ MYSQL_INSTALL_FOLDER=MySQL_${MYSQL_RELEASE}
[redwards@lw-lts-155 MySQL_5.5.22]$ OS_VERSION=000
[redwards@lw-lts-155 MySQL_5.5.22]$ if [ ${WHATOS} -eq 0 ] ; then OS_VERSION=linux2.6 ; fi
[redwards@lw-lts-155 MySQL_5.5.22]$ if [ ${WHATOS} -eq 5 ] ; then OS_VERSION=rhel5    ; fi
[redwards@lw-lts-155 MySQL_5.5.22]$ if [ ${WHATOS} -eq 6 ] ; then OS_VERSION=el6    ; fi
[redwards@lw-lts-155 MySQL_5.5.22]$ RELEASE_TAG=1
[redwards@lw-lts-155 MySQL_5.5.22]$ DEVEL__RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ SHARD2_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-compat-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ SHARED_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ CLIENT_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ SERVER_RPM=http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-${MYSQL_RELEASE}-${RELEASE_TAG}.${OS_VERSION}.${BINARY_VERSION}.rpm/from/http://mysql.mirrors.pair.com/
[redwards@lw-lts-155 MySQL_5.5.22]$ PERL_LOCATION=ftp://ftp.de.netclusive.de/pub/parallels/Plesk/Expand/2.3.1/packages
[redwards@lw-lts-155 MySQL_5.5.22]$ PERL_FILE=perl-DBI-1.53-2.fc7.x86_64.rpm
[redwards@lw-lts-155 MySQL_5.5.22]$ PERL_URL=${PERL_LOCATION}/${PERL_FILE}
[redwards@lw-lts-155 MySQL_5.5.22]$ cd
[redwards@lw-lts-155 ~]$ rm -rf ${MYSQL_INSTALL_FOLDER}
[redwards@lw-lts-155 ~]$ mkdir ${MYSQL_INSTALL_FOLDER}
[redwards@lw-lts-155 ~]$ cd ${MYSQL_INSTALL_FOLDER}
[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${PERL_URL}
--2012-04-10 15:40:23--  ftp://ftp.de.netclusive.de/pub/parallels/Plesk/Expand/2.3.1/packages/perl-DBI-1.53-2.fc7.x86_64.rpm
           => `perl-DBI-1.53-2.fc7.x86_64.rpm'
Resolving ftp.de.netclusive.de... 89.110.128.25
Connecting to ftp.de.netclusive.de|89.110.128.25|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/parallels/Plesk/Expand/2.3.1/packages ... done.
==> SIZE perl-DBI-1.53-2.fc7.x86_64.rpm ... 625843
==> PASV ... done.    ==> RETR perl-DBI-1.53-2.fc7.x86_64.rpm ... done.
Length: 625843 (611K)

100%[===================================================================================================================================>] 625,843      702K/s   in 0.9s

2012-04-10 15:40:26 (702 KB/s) - `perl-DBI-1.53-2.fc7.x86_64.rpm' saved [625843]

[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${DEVEL__RPM}
--2012-04-10 15:40:26--  http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.22-1.el6.i686.rpm/from/http://mysql.mirrors.pair.com/
Resolving www.mysql.com... 156.151.63.6
Connecting to www.mysql.com|156.151.63.6|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-devel-5.5.22-1.el6.i686.rpm [following]
--2012-04-10 15:40:26--  http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-devel-5.5.22-1.el6.i686.rpm
Resolving mysql.mirrors.pair.com... 216.92.2.145
Connecting to mysql.mirrors.pair.com|216.92.2.145|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4909292 (4.7M) [text/plain]
Saving to: `MySQL-devel-5.5.22-1.el6.i686.rpm'

100%[===================================================================================================================================>] 4,909,292   3.01M/s   in 1.6s

2012-04-10 15:40:29 (3.01 MB/s) - `MySQL-devel-5.5.22-1.el6.i686.rpm' saved [4909292/4909292]

[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${SHARD2_RPM}
--2012-04-10 15:40:29--  http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-compat-5.5.22-1.el6.i686.rpm/from/http://mysql.mirrors.pair.com/
Resolving www.mysql.com... 156.151.63.6
Connecting to www.mysql.com|156.151.63.6|:80... connected.
HTTP request sent, awaiting response... 404 Not found
2012-04-10 15:40:29 ERROR 404: Not found.

[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${SHARED_RPM}
--2012-04-10 15:40:29--  http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-5.5.22-1.el6.i686.rpm/from/http://mysql.mirrors.pair.com/
Resolving www.mysql.com... 156.151.63.6
Connecting to www.mysql.com|156.151.63.6|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-shared-5.5.22-1.el6.i686.rpm [following]
--2012-04-10 15:40:29--  http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-shared-5.5.22-1.el6.i686.rpm
Resolving mysql.mirrors.pair.com... 216.92.2.145
Connecting to mysql.mirrors.pair.com|216.92.2.145|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1685312 (1.6M) [text/plain]
Saving to: `MySQL-shared-5.5.22-1.el6.i686.rpm'

100%[===================================================================================================================================>] 1,685,312   2.92M/s   in 0.6s

2012-04-10 15:40:30 (2.92 MB/s) - `MySQL-shared-5.5.22-1.el6.i686.rpm' saved [1685312/1685312]

[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${CLIENT_RPM}
--2012-04-10 15:40:30--  http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.22-1.el6.i686.rpm/from/http://mysql.mirrors.pair.com/
Resolving www.mysql.com... 156.151.63.6
Connecting to www.mysql.com|156.151.63.6|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-client-5.5.22-1.el6.i686.rpm [following]
--2012-04-10 15:40:31--  http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-client-5.5.22-1.el6.i686.rpm
Resolving mysql.mirrors.pair.com... 216.92.2.145
Connecting to mysql.mirrors.pair.com|216.92.2.145|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14633936 (14M) [text/plain]
Saving to: `MySQL-client-5.5.22-1.el6.i686.rpm'

100%[===================================================================================================================================>] 14,633,936  3.52M/s   in 4.1s

2012-04-10 15:40:38 (3.44 MB/s) - `MySQL-client-5.5.22-1.el6.i686.rpm' saved [14633936/14633936]

[redwards@lw-lts-155 MySQL_5.5.22]$ wget ${SERVER_RPM}
--2012-04-10 15:40:38--  http://www.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.22-1.el6.i686.rpm/from/http://mysql.mirrors.pair.com/
Resolving www.mysql.com... 156.151.63.6
Connecting to www.mysql.com|156.151.63.6|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-server-5.5.22-1.el6.i686.rpm [following]
--2012-04-10 15:40:39--  http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/MySQL-server-5.5.22-1.el6.i686.rpm
Resolving mysql.mirrors.pair.com... 216.92.2.145
Connecting to mysql.mirrors.pair.com|216.92.2.145|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40659264 (39M) [text/plain]
Saving to: `MySQL-server-5.5.22-1.el6.i686.rpm'

100%[===================================================================================================================================>] 40,659,264  3.33M/s   in 11s

2012-04-10 15:40:58 (3.54 MB/s) - `MySQL-server-5.5.22-1.el6.i686.rpm' saved [40659264/40659264]

[redwards@lw-lts-155 MySQL_5.5.22]$ ls -l
total 61140
-rw-r--r-- 1 redwards users 14633936 Mar 13 19:55 MySQL-client-5.5.22-1.el6.i686.rpm
-rw-r--r-- 1 redwards users  4909292 Mar 13 19:55 MySQL-devel-5.5.22-1.el6.i686.rpm
-rw-r--r-- 1 redwards users 40659264 Mar 13 19:56 MySQL-server-5.5.22-1.el6.i686.rpm
-rw-r--r-- 1 redwards users  1685312 Mar 13 19:57 MySQL-shared-5.5.22-1.el6.i686.rpm
-rw-r--r-- 1 redwards users   625843 Apr 10 15:40 perl-DBI-1.53-2.fc7.x86_64.rpm
[redwards@lw-lts-155 MySQL_5.5.22]$

Just run this

for RPM in `ls -lSr *.rpm | awk '{print $9}'` ; do rpm -Uvh --force ${RPM} ; done

and you are good to go !!!

10
  • should I create a shell script and run that file or run every command at a time or just copy everything and run it in terminal ?
    – vinny
    Commented Apr 10, 2012 at 17:35
  • I always copy and paste. You can do the same. You also have the option to make a shell script. Commented Apr 10, 2012 at 17:36
  • Do i need to change HOWMANYBITS=64 to 32 bits if its a 32 bit machine ?
    – vinny
    Commented Apr 10, 2012 at 17:50
  • Oh yes. You can change HOWMANYBITS, WHATOS, MINOR_RELEASE (I have a separate copy-and-paste script for really old versions of MySQL) Commented Apr 10, 2012 at 18:10
  • I tried changing it to 32 but its still downloading the 64 bit version for some reason !! Why could that be ?
    – vinny
    Commented Apr 10, 2012 at 18:30
1

I have had good luck using the IUS Repository for my Centos 5, and it seems they support CentOS 6 as well. They separate the MySQL versions like:

mysql = MySQL 5.0
mysql51 = MySQL 5.1
mysql55 = MySQL 5.5

The benefit is you get the benefits of using a frequently maintained and tested repository for updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.