Codit Develop
Codit Develop
Codit Develop
전체 방문자
오늘
어제
  • 분류 전체보기 (146)
    • IT (1)
      • 스마트폰 (1)
    • Game (59)
      • DNF (0)
      • StarCraft2 (11)
      • LostArk (45)
      • Minecraft (3)
      • Elyon (0)
    • Develop (43)
      • Web (15)
      • PHP (2)
      • Laravel (0)
      • C# (11)
      • NodeJS (1)
      • Java (2)
      • Python (1)
      • Cordova (3)
      • Android (0)
      • WPF (1)
      • PowerShell (5)
      • Other (2)
      • Javascript (0)
    • OS (17)
      • Windows (6)
      • Linux (11)
    • Product (17)
      • Docker (10)
      • GitLab (3)
      • NuGet (2)
      • Git (1)
      • Nginx (1)
    • DB (7)
      • All-DB (2)
      • MariaDB (2)
      • MySQL (2)
      • Oracle (0)
      • MSSQL (1)
      • Cubrid (0)
    • PC (2)
      • 견적함 (2)
      • 정보 (0)

블로그 메뉴

    공지사항

    인기 글

    태그

    • c#
    • 숨겨진
    • jQuery
    • 히든
    • 조합
    • 뷰포인트
    • Linux
    • 스타2
    • 모험의 서
    • 개인복권디펜스
    • 모험의서
    • docker
    • css
    • 개복디
    • web
    • 구릉지
    • 유디아
    • 서
    • 몬스터
    • MySQL
    • JavaScript
    • 모코코
    • 오즈혼
    • 디펜스
    • 씨앗
    • 로스트아크
    • 모험의
    • 아르테미스
    • html
    • db

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    Codit Develop
    OS/Linux

    [Linux] CentOS 8 MariaDB 설치

    OS/Linux

    [Linux] CentOS 8 MariaDB 설치

    2020. 4. 5. 17:34
    반응형

    설치

    1. mariaDB 패키지 설치

    sudo yum install mariadb-server -y

    2. 설치 완료 후 mariaDB 실행

    systemctl start mariadb

    3. 재부팅 시 자동으로 실행되게끔 설정

    systemctl enable mariadb

     

     

    MariaDB 설정

    1. 설정 명령어 입력

    mysql_secure_installation

    2. 각 항목 설정

    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
    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
     ... 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] n
     ... skipping.
    
    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
     - 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
     ... 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!
    1. Enter current password for root (enter for none): 
     - 현재 설정되어 있는 mysql root 비밀번호 입력 
     - 설정한 기억이 없을 경우 빈칸 엔터
     
    2. Set root password? [Y/n] 
     - root 비밀번호 설정 여부. 
     - Y 입력
    
    3. 
     New password: 
     Re-enter new password: 
     - root 비밀번호 설정. 동일한 비밀번호 2번 입력
    
    4. Remove anonymous users? [Y/n] 
     - 생성되어 있는 익명 계정 삭제 여부.
     - 보안 상 Y 권장
     
    5. Disallow root login remotely? [Y/n] 
     - root 계정의 localhost 외 다른 ip로의 원격 접속 허용 여부
     - 보안상 N 권장
     
    6. Remove test database and access to it? [Y/n] 
     - 테스트용으로 만들어진 test 데이터베이스 삭제 여부
    
    7. Reload privilege tables now? [Y/n] 
     - 설정한 root 비밀번호 및 권한 저장 여부
     - Y 입력

     

     

    접속 여부 확인

    1. mariaDB 서비스 확인

    systemctl status mariadb

    2. 콘솔에서 mariaDB 접속 테스트

    mysql -u [생성한 계정(root)] -p

     

     

     

     

    반응형
    저작자표시 비영리 변경금지 (새창열림)

    'OS > Linux' 카테고리의 다른 글

    [Linux] OpenSSL - Root CA 생성 및 SSL 인증서 발급  (0) 2020.09.21
    [Linux] CentOS 8 firewalld 설치 및 사용법  (0) 2020.04.06
    [Linux] CentOS 8 firewalld 비활성화 / iptables 활성화  (0) 2020.04.06
    [Linux] Ubuntu 18.04 업데이트 서버 변경  (0) 2019.08.16
    [Linux] Ubuntu 18.04 OpenSSH 설치 (+ sftp 사용)  (0) 2019.05.02
    • 설치
    • MariaDB 설정
    • 접속 여부 확인
    'OS/Linux' 카테고리의 다른 글
    • [Linux] CentOS 8 firewalld 설치 및 사용법
    • [Linux] CentOS 8 firewalld 비활성화 / iptables 활성화
    • [Linux] Ubuntu 18.04 업데이트 서버 변경
    • [Linux] Ubuntu 18.04 OpenSSH 설치 (+ sftp 사용)
    Codit Develop
    Codit Develop
    내가 보려고 만든 개발 블로그

    티스토리툴바

    단축키

    내 블로그

    내 블로그 - 관리자 홈 전환
    Q
    Q
    새 글 쓰기
    W
    W

    블로그 게시글

    글 수정 (권한 있는 경우)
    E
    E
    댓글 영역으로 이동
    C
    C

    모든 영역

    이 페이지의 URL 복사
    S
    S
    맨 위로 이동
    T
    T
    티스토리 홈 이동
    H
    H
    단축키 안내
    Shift + /
    ⇧ + /

    * 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.