05-15 20:52
Recent Posts
Recent Comments
관리 메뉴

miinsun

[Linux] Rocky Linux에 MySql 설치 본문

OS/Linux & Ubuntu

[Linux] Rocky Linux에 MySql 설치

miinsun 2021. 11. 25. 15:56

 

Rocky Linux 8 AppStream Repository에서 MySQL을 설치할 수 있습니다.

 

 AppStream에서 제공되는 MySql 버전 확인
$ dnf whatprovides mysql-server

mysql-server-8.0.26-1.module+el8.3.0+242+87d3366a.x86_64 : The MySQL server and related files
Repo        : appstream
Matched from:
Provide    : mysql-server = 8.0.26-1.module+el8.3.0+242+87d3366a
 

 

MySql 설치
$ dnf install mysql-server

or

$ dnf install @mysql​

MySql 실행
$ systemctl enable --now  mysqld

MySql status 확인
$ systemctl status mysqld
 

초기 비밀번호 설정
$ mysql_secure_installation

 

  • 비밀번호 정책 설정 & 비밀번호 세팅
Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: y <!-- y 입력 -->
 
There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file

<!--
비밀번호 정책 선택
0 : 길이 8 이하
1 : 길이 8 이하, 숫자, 대/소문자 혼합, 특수 문자 사용
2 : 길이 8 이하, 숫자, 대/소문자 혼합, 특수 문자, dictionary 파일 사용
-->
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1 <!-- 원하는 정책 입력 -->
Please set the password for root here.

<!-- 비밀번호 설정 -->
New password: 

Re-enter new password: 

Estimated strength of the password: 100 <!-- 암호 예상 강도 입력 -->
Do you wish to continue with the password provided? (Press y|Y for Yes, any other key for No) : y <!-- y 입력 -->

 

MySql 접속
$ mysql -u root -p

Enter  password:  <!-- 위에서 세팅한 password 입력 -->

 

Comments