티스토리 뷰

MariaDB install(10.5)

1. Ver 10.5 설치를 위한 사전작업(이거 안하면 그냥 기본버전인 10.3정도로 설치)

sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'

sudo add-apt-repository 'deb [arch=amd64] https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'  


2. 본격 설치!

sudo apt update
sudo apt install mariadb-server mariadb-client

 

3. 설정시작

sudo mysql_secure_installation 

 

추가적인 my.conf 등의 설정은 개별적으로 확인

 

4. 상태확인

systemctl status mysql

 

5. mysql5.7이상, mariadb10.1이후 버전은 보안상 root계정은 터미널사용만 가능하다.

이에 phpmyadmin을 사용하려면

계정을 별도로 만들어서 관리자 권한부여후 웹에서 사용(root보다는 한단계낮은 권한?)

create user '아이디'@'%' identified by '비밀번호';

grant all privileges on *.* to '아이디'@'%';

 

웹에서 root와 거의 동일한 권한을 사용하려면 아래 쿼리 추가

UPDATE mysql.user SET Grant_priv='Y', Super_Priv='Y' WHERE user='아이디';

FLUSH PRIVILEGES;

 

 

사실 mysql8.0 사용해도 별 문제는 없을듯

 

 

댓글
  • 프로필사진 이온디 root@bluewings:~# sudo add-apt-repository 'deb [arch=amd64] https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'
    Hit:1 http://mirror.kakao.com/ubuntu bionic InRelease
    Hit:2 http://mirror.kakao.com/ubuntu bionic-updates InRelease
    Ign:3 https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal InRelease
    Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
    Hit:5 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
    Hit:6 http://nginx.org/packages/mainline/ubuntu bionic InRelease
    Err:7 https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal Release
    Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. The name in the certificate does not match the expected. Could not handshake: Error in the certificate verification. [IP: 74.120.223.18 443]
    Reading package lists... Done
    E: The repository 'https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    root@bluewings:~# sudo apt update
    Hit:1 http://mirror.kakao.com/ubuntu bionic InRelease
    Hit:2 http://mirror.kakao.com/ubuntu bionic-updates InRelease
    Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
    Ign:4 https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal InRelease
    Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
    Hit:6 http://nginx.org/packages/mainline/ubuntu bionic InRelease
    Err:7 https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal Release
    Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. The name in the certificate does not match the expected. Could not handshake: Error in the certificate verification. [IP: 74.120.223.18 443]
    Reading package lists... Done
    E: The repository 'https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    root@bluewings:~# sudo apt install mariadb-server
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    mariadb-server : Depends: mariadb-server-10.1 (>= 1:10.1.47-0ubuntu0.18.04.1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    이런 오류는 어떻게 고쳐야할까요?
    2021.03.01 03:39
  • 프로필사진 BlogIcon kkwang sudo add-apt-repository 'deb [arch=amd64] https://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'
    이 부분을
    sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://ftp.harukasan.org/mariadb/repo/10.5/ubuntu focal main'
    요렇게 수정한번 해보세요.

    위에꺼 하니 무슨 인증이 어쩌고 하는것 같던데..

    /etc/apt/sources.list sources_original.list
    요 파일 열어서 하단에 기존 입력된 부분 제거 하시고요~
    2021.03.08 14:22
댓글쓰기 폼