DB(SQL)

[MySQL] Mysql 설치 (mysql 5.5.54)

_주야 2017. 3. 15. 20:35

 

MySQL 설치 (mysql 5.0.85)

 

1. 파일 다운로드

- windows에서 다운로드

https://dev.mysql.com/downloads/mysql/

 

- linux에서 다운로드

wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.85.tar.gz

 

2. 설치 및 구성

$ tar -xvzf mysql-5.0.85.tar.gz

$ cd mysql-5.0.85

$ ./configure --prefix=/mysql/mysql --with-charset=utf8 --with-innodb

$ make && make install

 

[참고1] 컴파일용 설치 파일은 반드시...

Select Platform을 Source Code를 선택하고 Compressed TAR Archive 다운

 

[참고2] 설치 시 오류 발생되는 경우...

- 내용 : FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db:

- 설치 : yum -y install perl-Data-Dumper

 

- 내용 : configure: error: No curses/termcap library found

- 설치 : yum -y install ncurses-devel

 

- 내용 : exec: g++: not found
- 설치 : yum -y install gcc-c++

 

----- mysql 접속 실패.. 어렵네 .. 소스 파일로 컴파일 해가며 설치해보고 싶었으나 어쩔 수 없이 rpm으로 재설치 시도... -----

[참고] 설치 참고한 곳.! (감사)

http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_MySQL_%EC%B5%9C%EC%8B%A0%EB%B2%84%EC%A0%84_%EC%84%A4%EC%B9%98

---------------------------------------------------------------------------------------------------------------------------------------

 

MySQL 설치 (mysql 5.5.54)

 

1. 파일 다운로드

https://dev.mysql.com/downloads/mysql/5.5.html#downloads

 

Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package MySQL Server

Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Package Client Utilities

 

2. MYSQL Server 설치

 

[참고] 설치 시 maria DB 충돌 오류 발생

- 내용 : Transaction check error:
  MySQL-server-5.5.54-1.el7.x86_64에서 설치되는 /usr/share/mysql/charsets/README 파일은 mariadb-libs-1:5.5.35-3.el7.x86_64 패키지의 파일과 충돌합니다
  MySQL-server-5.5.54-1.el7.x86_64에서 설치되는 /usr/share/mysql/charsets/Index.xml 파일은 mariadb-libs-1:5.5.35-3.el7.x86_64 패키지의 파일과 충돌합니다
  MySQL-server-5.5.54-1.el7.x86_64에서 설치되는 /usr/share/mysql/charsets/armscii8.xml 파일은 mariadb-libs-1:5.5.35-3.el7.x86_64 패키지의 파일과 충돌합니다
.... 생략 ....

Error Summary

- 해결 : 패키지 삭제 및 MYSQL 설치 전 패키지 설치 여부 확인!
# rpm -qa | grep -i maria
mariadb-libs-5.5.35-3.el7.x86_64
# yum remove mariadb-libs-5.5.35-3.el7.x86_64
# rpm -qa | grep -i maria
# rpm -qa | grep -i mysql


# cd /home/mysql/
# ls
MySQL-client-5.5.54-1.el7.x86_64.rpm  MySQL-server-5.5.54-1.el7.x86_64.rpm

# yum install MySQL-server-5.5.54-1.el7.x86_64.rpm
Loaded plugins: langpacks
Examining MySQL-server-5.5.54-1.el7.x86_64.rpm: MySQL-server-5.5.54-1.el7.x86_64
Marking MySQL-server-5.5.54-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package MySQL-server.x86_64 0:5.5.54-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package            Arch         Version              Repository                               Size
====================================================================================================
Installing:
 MySQL-server       x86_64       5.5.54-1.el7         /MySQL-server-5.5.54-1.el7.x86_64       190 M

Transaction Summary
====================================================================================================
Install  1 Package

Total size: 190 M
Installed size: 190 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : MySQL-server-5.5.54-1.el7.x86_64                                                 1/1
  Verifying  : MySQL-server-5.5.54-1.el7.x86_64                                                 1/1

Installed:
  MySQL-server.x86_64 0:5.5.54-1.el7

Complete!

 

3. 설치 확인 및 기동/정지

# service mysql status
 ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

# service mysql start
Starting MySQL....... SUCCESS!

# service mysql status
 SUCCESS! MySQL running (11431)

# netstat -an | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN

 

# chkconfig --list mysql

알림: 이 출력 결과에서는 SysV 서비스만을 보여주며 기존의 systemd 서비스는
포함되어 있지 않습니다. SysV 설정 데이터는 기존의 systemd  설정에 의해
덮어쓰기될 수 있습니다.

      'systemctl list-unit-files'를 사용하여 systemd 서비스를 나열합니다.
       특정 대상에 활성화된 서비스를 확인하려면
       'systemctl list-dependencies [target]'을 사용합니다.

mysql           0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제

 

 4. MYSQL Client 설치

# yum install MySQL-client-5.5.54-1.el7.x86_64.rpm
Loaded plugins: langpacks
Examining MySQL-client-5.5.54-1.el7.x86_64.rpm: MySQL-client-5.5.54-1.el7.x86_64
Marking MySQL-client-5.5.54-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package MySQL-client.x86_64 0:5.5.54-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package            Arch         Version              Repository                               Size
====================================================================================================
Installing:
 MySQL-client       x86_64       5.5.54-1.el7         /MySQL-client-5.5.54-1.el7.x86_64        68 M

Transaction Summary
====================================================================================================
Install  1 Package

Total size: 68 M
Installed size: 68 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : MySQL-client-5.5.54-1.el7.x86_64                                                 1/1
  Verifying  : MySQL-client-5.5.54-1.el7.x86_64                                                 1/1

Installed:
  MySQL-client.x86_64 0:5.5.54-1.el7

Complete!

 

5. MYSQL 접속 확인

# ./mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.54 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.08 sec)

 

 


 

'DB(SQL)' 카테고리의 다른 글

[MySQL] 원격 접속 특정 IP 허용  (0) 2017.03.16
[MySQL] root 패스워드 변경  (0) 2017.03.16
[SQL] commit  (0) 2017.02.28
[SQL] 테이블 생성/복사/삭제  (0) 2017.02.28
[SQL] 제약조건 연습  (0) 2017.02.28