"리눅스 MySQL 최신버전 설치"의 두 판 사이의 차이

26번째 줄: 26번째 줄:
*Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package Client Utilities 오른쪽에 있는 [Download] 클릭하여 MySQL-client-5.6.17-1.el6.x86_64.rpm 다운로드 (17.7MB)
*Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package Client Utilities 오른쪽에 있는 [Download] 클릭하여 MySQL-client-5.6.17-1.el6.x86_64.rpm 다운로드 (17.7MB)


==업로드==
==파일 업로드==
*rpm 파일들을 대상 서버에 업로드
*rpm 파일들을 대상 서버에 업로드
<source lang='dos'>
<source lang='dos'>
34번째 줄: 34번째 줄:
</source>
</source>


==설치 1 (실패)==
==서버 설치 1 (실패)==
<source lang='dos'>
<source lang='dos'>
[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm  
[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm  
100번째 줄: 100번째 줄:
</source>
</source>


==설치 2 (성공)==
==서버 설치 2 (성공)==
<source lang='dos'>
<source lang='dos'>
[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm  
[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm  
175번째 줄: 175번째 줄:
tcp        0      0 :::3306                    :::*                        LISTEN      3528/mysqld         
tcp        0      0 :::3306                    :::*                        LISTEN      3528/mysqld         
unix  2      [ ACC ]    STREAM    LISTENING    37056  3528/mysqld        /var/lib/mysql/mysql.sock
unix  2      [ ACC ]    STREAM    LISTENING    37056  3528/mysqld        /var/lib/mysql/mysql.sock
</source>
==클라이언트 설치==
<source lang='dos'>
[root@jmnote ~]# yum install MySQL-client-5.6.17-1.el6.x86_64.rpm
... (생략)
==========================================================================================
Package          Arch      Version          Repository                            Size
==========================================================================================
Installing:
MySQL-client    x86_64    5.6.17-1.el6    /MySQL-client-5.6.17-1.el6.x86_64      82 M
Transaction Summary
==========================================================================================
Install      1 Package(s)
Total size: 82 M
Installed size: 82 M
Is this ok [y/N]: y
</source>
<source lang='dos'>
... (생략)
Installed:
  MySQL-client.x86_64 0:5.6.17-1.el6                                                     
Complete!
</source>
</source>



2014년 4월 19일 (토) 01:11 판

리눅스 MySQL 최신 버전 설치

1 리눅스 확인

[root@jmnote ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m
[root@jmnote ~]# getconf LONG_BIT
64
→ CentOS 6.3이고 64비트이다.

2 다운로드

  • 웹브라우저에서 http://dev.mysql.com/downloads/mysql/ 접속
  • Select Platform: Red Hat Enterprise Linux / Oracle Linux 선택[1]
  • Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package MySQL Server 오른쪽에 있는 [Download] 클릭
  • 로그인 (계정 없으면 가입)
  • [Download Now » ] 클릭하여 MySQL-server-5.6.17-1.el6.x86_64.rpm 다운로드 (52.1MB)
  • 다시 http://dev.mysql.com/downloads/mysql/ 로 이동
  • Select Platform: Red Hat Enterprise Linux / Oracle Linux 선택[1]
  • Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package Client Utilities 오른쪽에 있는 [Download] 클릭하여 MySQL-client-5.6.17-1.el6.x86_64.rpm 다운로드 (17.7MB)

3 파일 업로드

  • rpm 파일들을 대상 서버에 업로드
[root@jmnote ~]# ll *.rpm -h
-rw-r--r--. 1 root root 18M Apr 19 01:08 MySQL-client-5.6.17-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 53M Apr 19 00:51 MySQL-server-5.6.17-1.el6.x86_64.rpm

4 서버 설치 1 (실패)

[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm 
... (생략)
==========================================================================================
 Package          Arch       Version          Repository                             Size
==========================================================================================
Installing:
 MySQL-server     x86_64     5.6.17-1.el6     /MySQL-server-5.6.17-1.el6.x86_64     233 M

Transaction Summary
==========================================================================================
Install       1 Package(s)

Total size: 233 M
Installed size: 233 M
Is this ok [y/N]: y
... (생략)
  file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

Error Summary
-------------
→ 설치 실패. mysql-libs 패키지와 충돌이 있음
[root@jmnote ~]# yum list installed | grep mysql-lib
mysql-libs.x86_64       5.1.61-4.el6    @anaconda-CentOS-201207061011.x86_64/6.3
→ CentOS 설치시에 설치된 패키지임
[root@jmnote ~]# yum remove mysql-libs.x86_64
... (생략)
==========================================================================================
 Package        Arch   Version             Repository                                Size
==========================================================================================
Removing:
 mysql-libs     x86_64 5.1.61-4.el6        @anaconda-CentOS-201207061011.x86_64/6.3 4.0 M
Removing for dependencies:
 cronie         x86_64 1.4.4-7.el6         @anaconda-CentOS-201207061011.x86_64/6.3 166 k
 cronie-anacron x86_64 1.4.4-7.el6         @anaconda-CentOS-201207061011.x86_64/6.3  43 k
 crontabs       noarch 1.10-33.el6         @anaconda-CentOS-201207061011.x86_64/6.3 2.4 k
 postfix        x86_64 2:2.6.6-2.2.el6_1   @anaconda-CentOS-201207061011.x86_64/6.3 9.7 M
 sysstat        x86_64 9.0.4-20.el6        @anaconda-CentOS-201207061011.x86_64/6.3 807 k

Transaction Summary
==========================================================================================
Remove        6 Package(s)

Installed size: 15 M
Is this ok [y/N]: y
... (생략)
Removed:
  mysql-libs.x86_64 0:5.1.61-4.el6                                                        

Dependency Removed:
  cronie.x86_64 0:1.4.4-7.el6              cronie-anacron.x86_64 0:1.4.4-7.el6           
  crontabs.noarch 0:1.10-33.el6            postfix.x86_64 2:2.6.6-2.2.el6_1              
  sysstat.x86_64 0:9.0.4-20.el6           

Complete!

5 서버 설치 2 (성공)

[root@jmnote ~]# yum install MySQL-server-5.6.17-1.el6.x86_64.rpm 
... (생략)
==========================================================================================
 Package          Arch       Version          Repository                             Size
==========================================================================================
Installing:
 MySQL-server     x86_64     5.6.17-1.el6     /MySQL-server-5.6.17-1.el6.x86_64     233 M

Transaction Summary
==========================================================================================
Install       1 Package(s)

Total size: 233 M
Installed size: 233 M
Is this ok [y/N]: y
... (생략)
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

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

New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

  Verifying  : MySQL-server-5.6.17-1.el6.x86_64                                       1/1 

Installed:
  MySQL-server.x86_64 0:5.6.17-1.el6                                                      

Complete!

6 서비스 시작

[root@jmnote ~]# service mysql status
 ERROR! MySQL is not running
[root@jmnote ~]# service mysql start
Starting MySQL... SUCCESS!
[root@jmnote ~]# service mysql status
 SUCCESS! MySQL running (3528)
[root@jmnote ~]# netstat -anp | grep mysql
tcp        0      0 :::3306                     :::*                        LISTEN      3528/mysqld         
unix  2      [ ACC ]     STREAM     LISTENING     37056  3528/mysqld         /var/lib/mysql/mysql.sock

7 클라이언트 설치

[root@jmnote ~]# yum install MySQL-client-5.6.17-1.el6.x86_64.rpm 
... (생략)
==========================================================================================
 Package          Arch       Version          Repository                             Size
==========================================================================================
Installing:
 MySQL-client     x86_64     5.6.17-1.el6     /MySQL-client-5.6.17-1.el6.x86_64      82 M

Transaction Summary
==========================================================================================
Install       1 Package(s)

Total size: 82 M
Installed size: 82 M
Is this ok [y/N]: y
... (생략)
Installed:
  MySQL-client.x86_64 0:5.6.17-1.el6                                                      

Complete!

8 로그인 확인

[root@jmnote ~]# cat /root/.mysql_secret
# The random password set for the root user at Sat Apr 19 00:59:53 2014 (local time): KsoIfMYlfM6EQGUT

9 같이 보기

10 주석

  1. 1.0 1.1 설치할 서버에 맞는 것으로 선택한다. Debian, SuSE 등이 있다. 여기서는 CentOS가 레드햇 계열이므로 이것을 선택했다.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}