Install MySql 5.5 on CentOS 6.3 Work/MySql2012. 11. 8. 15:53
ref : http://www.tecmint.com/install-mysql-on-rhel-centos-6-5-fedora-17-12/
1. Remi Repository 설치
## Install Remi Repository on RHEL/CentOS 6.7-6.0 ## rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
2. MySql version 확인
yum --enablerepo=remi list mysql mysql-server
※ 확인 예제
Available Packages
mysql-server.i686 5.5.28-1.el6.remi remi
3. MySql 설치
yum --enablerepo=remi install mysql mysql-server
4. MySql 실행
service mysqld start
5. MySql version 확인
mysql -u root
select version();
※ 설치 Example
[root@localhost ~]# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
warning: /var/tmp/rpm-tmp.Siat48: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[root@localhost ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
warning: /var/tmp/rpm-tmp.1EyPOa: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing... ########################################### [100%]
1:remi-release ########################################### [100%]
[root@localhost ~]#
[root@localhost ~]# yum --enablerepo=remi list mysql mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink | 3.6 kB 00:00
* base: centos.tt.co.kr
* epel: ftp.riken.jp
* extras: centos.tt.co.kr
* remi: remi-mirror.dedipower.com
* updates: centos.tt.co.kr
epel | 4.3 kB 00:00
epel/primary_db | 4.8 MB 00:05
remi | 2.9 kB 00:00
remi/primary_db | 401 kB 00:04
Available Packages
mysql.x86_64 5.5.28-1.el6.remi remi
mysql-server.x86_64 5.5.28-1.el6.remi remi
[root@localhost ~]#
[root@localhost ~]# yum --enablerepo=remi install mysql mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* epel: ftp.riken.jp
* extras: centos.tt.co.kr
* remi: remirpm.mirror.gymkl.ch
* updates: centos.tt.co.kr
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.5.28-1.el6.remi will be installed
--> Processing Dependency: mysql-libs(x86-64) = 5.5.28-1.el6.remi for package: mysql-5.5.28-1.el6.remi.x86_64
---> Package mysql-server.x86_64 0:5.5.28-1.el6.remi will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.5.28-1.el6.remi.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.5.28-1.el6.remi.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.5.28-1.el6.remi.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be updated
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
---> Package mysql-libs.x86_64 0:5.5.28-1.el6.remi will be an update
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Running transaction check
---> Package compat-mysql51.x86_64 0:5.1.54-1.el6.remi will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
mysql x86_64 5.5.28-1.el6.remi remi 5.7 M
mysql-server x86_64 5.5.28-1.el6.remi remi 10 M
Installing for dependencies:
compat-mysql51 x86_64 5.1.54-1.el6.remi remi 1.4 M
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
perl-DBI x86_64 1.609-4.el6 base 705 k
Updating for dependencies:
mysql-libs x86_64 5.5.28-1.el6.remi remi 771 k
Transaction Summary
=============================================================================================================================
Install 5 Package(s)
Upgrade 1 Package(s)
Total download size: 19 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): compat-mysql51-5.1.54-1.el6.remi.x86_64.rpm | 1.4 MB 00:07
(2/6): mysql-5.5.28-1.el6.remi.x86_64.rpm | 5.7 MB 00:31
(3/6): mysql-libs-5.5.28-1.el6.remi.x86_64.rpm | 771 kB 00:03
(4/6): mysql-server-5.5.28-1.el6.remi.x86_64.rpm | 10 MB 00:53
(5/6): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00
(6/6): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------
Total 194 kB/s | 19 MB 01:38
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
Userid : Remi Collet <RPMS@FamilleCollet.com>
Package: remi-release-6-1.el6.remi.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : perl-DBI-1.609-4.el6.x86_64 1/7
Updating : mysql-libs-5.5.28-1.el6.remi.x86_64 2/7
WARNING : This MySQL RPM is not an official Fedora / Red Hat build and it
overrides the official one. Don't file bugs on Fedora Project nor Red Hat.
Use dedicated forums http://forums.famillecollet.com/
Installing : mysql-5.5.28-1.el6.remi.x86_64 3/7
Installing : compat-mysql51-5.1.54-1.el6.remi.x86_64 4/7
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 5/7
Installing : mysql-server-5.5.28-1.el6.remi.x86_64 6/7
Cleanup : mysql-libs-5.1.61-4.el6.x86_64 7/7
Verifying : compat-mysql51-5.1.54-1.el6.remi.x86_64 1/7
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 2/7
Verifying : mysql-libs-5.5.28-1.el6.remi.x86_64 3/7
Verifying : mysql-5.5.28-1.el6.remi.x86_64 4/7
Verifying : perl-DBI-1.609-4.el6.x86_64 5/7
Verifying : mysql-server-5.5.28-1.el6.remi.x86_64 6/7
Verifying : mysql-libs-5.1.61-4.el6.x86_64 7/7
Installed:
mysql.x86_64 0:5.5.28-1.el6.remi mysql-server.x86_64 0:5.5.28-1.el6.remi
Dependency Installed:
compat-mysql51.x86_64 0:5.1.54-1.el6.remi perl-DBD-MySQL.x86_64 0:4.013-3.el6 perl-DBI.x86_64 0:1.609-4.el6
Dependency Updated:
mysql-libs.x86_64 0:5.5.28-1.el6.remi
Complete!
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# service 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 localhost.localdomain 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 /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]