centos下面安装mysql

MySQL 5.5 and 5.1 on CentOS 5.5

In a couple of days, MySQL 5.1 will move to extended lifecycle support, where only security fixes and the most severe bugs are fixed. MySQL 5.0 has bee like this for a year already. Typically, extended lifecycle will last for two years, after which will become end-of-line, where no support is guaranteed.

CentOS 5.x has been providing MySQL 5.0 in it’s distribution since that was the active stable branch when CentOS 5.0 was released on 12th April 2007 (or more specifically it’s upstream distribution RHEL 5, which was released 14th March 2007). Since then, Sun/Oracle have released MySQL 5.1 and MySQL 5.5, so the Webtatic Yum repository has added them to it’s web stack, which now provides updated versions of all the AMP in LAMP.
This release is different from the previous packages, since it is important to only upgrade MySQL when you are ready, and you may want to chose to follow only 5.1 updates or 5.5 updates. This does mean though that you will have to uninstall your current mysql installation first.

First, to set up the yum repository, install the webtatic-release RPM:

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

MySQL client library is used with several CentOS packages, so to remove MySQL without them, I have a mysql client library which is independent of the client tools, which can be installed first to be used instead.

yum install libmysqlclient15 --enablerepo=webtatic

Then you can uninstall MySQL:

yum remove mysql mysql-*

Then install the new MySQL version (either mysql51 or mysql55 can be installed here):

yum install mysql55 mysql55-server --enablerepo=webtatic

You should upgrade existing tables before setting the server to become a production machine, which can be done by starting the server and running the mysql_upgrade script (this may take time depending on the size of the database).

service mysqld start
mysql_upgrade

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值