Shantanu's Blog

Corporate Consultant

November 10, 2010

 

Upgrading to 5.1 version from 5.0

1) Download Server from...
http://mysql.com/downloads/mirror.php?id=395761

MySQL-server-community-5.1.52-1.rhel5.x86_64.rpm

Download client from ...
http://mysql.com/downloads/mirror.php?id=395683

MySQL-client-community-5.1.52-1.rhel5.x86_64.rpm

Stop current MySQL deamon before installing the new version.

2) I have to uninstall 5.0 before installing 5.1 or else I get an error as shown below:

# rpm -ivh MySQL-client-community-5.1.52-1.rhel5.x86_64.rpm MySQL-server-community-5.1.52-1.rhel5.x86_64.rpm
error: Failed dependencies:
MySQL conflicts with mysql-5.0.77-3.el5.x86_64
MySQL-server conflicts with mysql-server-5.0.77-3.el5.x86_64


3) While uninstalling 5.0 I was informed that the dependencies too needs to be removed.

# rpm -e mysql-5.0.77-3.el5
error: Failed dependencies:
libmysqlclient.so.15()(64bit) is needed by (installed) perl-DBD-mysql-4.014-1.el5.rf.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) perl-DBD-mysql-4.014-1.el5.rf.x86_64
mysql is needed by (installed) perl-DBD-mysql-4.014-1.el5.rf.x86_64

4) SO I remove everything that is getting in my way.

# rpm -e mysql-5.0.77-3.el5 perl-DBD-mysql-4.014-1.el5.rf.x86_64 mysql-mmm-agent-2.2.1-1.el5.noarch

5) And now I am all set to install the shiny new MySQL version

# time rpm -ivh MySQL-client-community-5.1.52-1.rhel5.x86_64.rpm MySQL-server-community-5.1.52-1.rhel5.x86_64.rpm

6) Make sure it is installed
# rpm -qa | grep -i mysql
MySQL-server-community-5.1.52-1.rhel5
mysql-mmm-2.2.1-1.el5
MySQL-client-community-5.1.52-1.rhel5

7) Use the mysql_upgrade command to update the user tables. If your mysql.proc table gets corrupted due to any reason (for e.g. while trying to install 5.0 dump), use the following:

mysql_upgrade -f

This will forcefully fix the privilege tables. The 5.0 dump can be imported using the same -f (force) option as well. For e.g.

mysql -uroot -proot@123 -f < /home/today.sql

_____

Installing 5.0 version of mysql is easy.

# check what is installed
# rpm -qa | grep mysql-*
mysql-5.0.77-4.el5_4.2
mysql-5.0.77-4.el5_4.2
mod_auth_mysql-3.0.0-3.2.el5_3

# remove any conflicting version of mysql
# rpm -e mysql-5.0.77-4.el5_5.3.x86_64 --nodeps

# install using yum
# yum install mysql-*

Setting up Install Process
Package mysql-5.0.77-4.el5_4.2.x86_64 already installed and latest version
Package mysql-5.0.77-4.el5_4.2.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mysql-bench.x86_64 0:5.0.77-4.el5_4.2 set to be updated
=
Install 16 Package(s)
Update 5 Package(s)
Remove 0 Package(s)

Total size: 27 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : krb5-libs 1/26
Installing : perl-DBD-MySQL 2/26
Installing : mysql-server 3/26
Updating : libsepol 4/26
Cleanup : libsepol 24/26
Cleanup : krb5-workstation 25/26
Cleanup : krb5-libs 26/26

Installed:
mysql-bench.x86_64 0:5.0.77-4.el5_4.2 mysql-connector-odbc.x86_64 0:3.51.26r1127-1.el5 mysql-devel.i386 0:5.0.77-4.el5_4.2 mysql-devel.x86_64 0:5.0.77-4.el5_4.2
mysql-server.x86_64 0:5.0.77-4.el5_4.2 mysql-test.x86_64 0:5.0.77-4.el5_4.2

Dependency Installed:
e2fsprogs-devel.x86_64 0:1.39-23.el5 keyutils-libs-devel.x86_64 0:1.2-1.el5 krb5-devel.x86_64 0:1.6.1-36.el5_4.1 libselinux-devel.x86_64 0:1.33.4-5.5.el5
libsepol-devel.x86_64 0:1.15.2-3.el5 libtool-ltdl.x86_64 0:1.5.22-7.el5_4 openssl-devel.x86_64 0:0.9.8e-12.el5_4.6 perl-DBD-MySQL.x86_64 0:3.0007-2.el5
unixODBC.x86_64 0:2.2.11-7.1 zlib-devel.x86_64 0:1.2.3-3

Dependency Updated:
krb5-libs.i386 0:1.6.1-36.el5_4.1 krb5-libs.x86_64 0:1.6.1-36.el5_4.1 krb5-workstation.x86_64 0:1.6.1-36.el5_4.1 libsepol.i386 0:1.15.2-3.el5
libsepol.x86_64 0:1.15.2-3.el5

Complete!


# start mysql
# /etc/init.d/mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h vishnuvm7.hyd.wc password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
Starting MySQL: [ OK ]
[root@vishnuvm7 shantanu]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)



# rpm -qa | grep -i mysql-*
mysql-5.0.77-4.el5_4.2
mysql-server-5.0.77-4.el5_4.2
mysql-test-5.0.77-4.el5_4.2
mysql-bench-5.0.77-4.el5_4.2
mysql-5.0.77-4.el5_4.2
perl-DBD-MySQL-3.0007-2.el5
mod_auth_mysql-3.0.0-3.2.el5_3
mysql-connector-odbc-3.51.26r1127-1.el5
mysql-devel-5.0.77-4.el5_4.2
mysql-devel-5.0.77-4.el5_4.2

Labels:


Comments: Post a Comment

<< Home

Archives

June 2001   July 2001   January 2003   May 2003   September 2003   October 2003   December 2003   January 2004   February 2004   March 2004   April 2004   May 2004   June 2004   July 2004   August 2004   September 2004   October 2004   November 2004   December 2004   January 2005   February 2005   March 2005   April 2005   May 2005   June 2005   July 2005   August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006   January 2007   February 2007   March 2007   April 2007   June 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   May 2009   June 2009   July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   May 2010   June 2010   July 2010   August 2010   September 2010   October 2010   November 2010   December 2010   January 2011   February 2011   March 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   August 2012   October 2012   November 2012   December 2012   January 2013   February 2013   March 2013   April 2013   May 2013   June 2013   July 2013   September 2013   October 2013   January 2014   March 2014   April 2014   May 2014   July 2014   August 2014   September 2014   October 2014   November 2014   December 2014   January 2015   February 2015   March 2015   April 2015   May 2015   June 2015   July 2015   August 2015   September 2015   January 2016   February 2016   March 2016   April 2016   May 2016   June 2016   July 2016   August 2016   September 2016   October 2016   November 2016   December 2016   January 2017   February 2017   April 2017   May 2017   June 2017   July 2017  

This page is powered by Blogger. Isn't yours?