본문 바로가기

리눅스 헛다리/리눅스 centos7

mysql_secure_installation

반응형

 

mysql_secure_installation

MariaDB 기본보안 , 초기 설정 명령어

보통 MariaDB 첫설치 , 재설치후 바로 진행한다.

*** 설정 선택에 있어서 반드시 이렇게 하라는것은 아닙니다. 필요에 따라서 다를수 있습니다.

작성자의 설정은 참고만 하시기 바랍니다.

[root@xxxxxxxx/]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current

password for the root user. If you've just installed MariaDB, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none): <=== 루트의 현재 암호를 입력하십시오. 아무것도 입력하지 않으려면 엔터. 엔터 입력

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB

root user without the proper authorisation.

Set root password? [Y/n] y <=== root 비밀번호를 설정하시겠습니까? y 선택

New password: <=== 패스워드 입력

Re-enter new password: <=== 패스워드 재입력

Password updated successfully!

Reloading privilege tables..

... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n] y <=== 익명의 사용자 삭제 하겠는가? y 입력

... Success!

Normally, root should only be allowed to connect from 'localhost'. This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y <=== root 의 원격접속 여부 y가 허용안함. 일단 허용안함(원격접속 허용은 추후 따로 설정). y 입력

... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] y <=== 테스트 DB 삭제 하겠는가? y 입력

- Dropping test database...

... Success!

- Removing privileges on test database...

... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] y <=== 지금 권한 테이블을 다시 로드하시겠습니까? y 입력

... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

반응형

'리눅스 헛다리 > 리눅스 centos7' 카테고리의 다른 글

centos7 시작프로그램 등록  (0) 2024.02.20
centos7 mariadb 설치  (0) 2024.02.20
리눅스 tar  (0) 2024.02.20
centos7 user생성 비밀번호 설정  (0) 2024.02.20
centos7 nslookup,bind-utils  (0) 2022.09.14