1. MariaDB yum repo 등록
vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
mariadb 10.5 버전을 baseurl로 등록하였습니다. 다른 버전을 다운받고 싶다면 baseurl을 수정해주세요.
2. MariaDB 설치 및 확인
yum install MariaDB
# rpm -qa | grep MariaDB
MariaDB-compat-10.4.12-1.el7.centos.x86_64
MariaDB-client-10.4.12-1.el7.centos.x86_64
MariaDB-common-10.4.12-1.el7.centos.x86_64
MariaDB-server-10.4.12-1.el7.centos.x86_64
# mariadb --version
mariadb Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using readline 5.1
3. MariaDB 실행 및 비밀번호 변경
//mariadb 실행
# systemctl start mariadb
//비밀번호 변경
# /usr/bin/mysqladmin -u root password '변경할 비밀번호 입력'
//포트 및 데몬 이름 확인
# netstat -anp | grep 3306
4. CharaterSet utf8mb4로 변경
# vi /etc/my.cnf
[mysqld]
default_storage_engine=innodb
init-connect='SET NAMES utf8mb4'
lower_case_table_names=1
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
[client]
port=3306
default-character-set = utf8mb4
[mysqldump]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
mariadb 재시작
systemctl restart mariadb
5. mariaDB 로그인 및 CharacterSet 확인
# mysql -u root -p
Enter password: 설정한 비밀번호 입력
Mysql 계정 생성 (0) | 2021.06.30 |
---|---|
mariadb 컴파일 설치 Centos7 (0) | 2021.06.29 |
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) (0) | 2021.06.18 |
ERROR 1820 (HY000) : You must SET PASSWORD before executing this statement (0) | 2021.06.16 |
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) (0) | 2021.06.16 |
댓글 영역