CentOS5.6にyumでMySQLの最新をインストールする方法
CentOS5.6のインストール直後に普通にyumでMySQLをインストールしようとすると、古いバージョン(5.0.77)がインストール
されてしまうので、これをMySQL5.5系のインストールに変更する方法
# yum info mysql
Available Packages
Name : mysql
Arch : i386
Version : 5.0.77
Release : 4.el5_6.6Name : mysql
Arch : x86_64
Version : 5.0.77
Release : 4.el5_6.6
だもんで、Remiリポジトリの依存関係を追加して、インストール
# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
# yum --enablerepo=remi,eplp install mysql-server====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
mysql-server x86_64 5.5.13-1.el5.remi remi 12 M
Installing for dependencies:
mysql x86_64 5.5.13-1.el5.remi remi 7.4 M
mysql-libs x86_64 5.5.13-1.el5.remi remi 1.1 M
mysqlclient15 x86_64 5.0.67-1.el5.remi remi 1.3 M
perl-DBD-MySQL x86_64 3.0007-2.el5 base 148 kTransaction Summary
====================================================================================================
一応起動確認でもしておくか。
# /etc/rc.d/init.d/mysqld start
Initializing MySQL database: WARNING: The host '***' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
OK
Filling help tables...
OKTo start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your systemPLEASE 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 *** password 'new-password'Alternatively you can run:
/usr/bin/mysql_secure_installationwhich 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 /usr/mysql-test ; perl mysql-test-run.plPlease report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]
# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.13 MySQL Community Server (GPL) by RemiCopyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.