http://iotn.co.kr 연락처: gilho.kr@gmail.com [ The Japanese government should apologize to Japanese Military Sexual Slavery victim. / 日本政府は日本軍の性的奴隷?牲者に謝罪すべき. ]

사용자

ID:
PW:

INDEX
01.게시판
게시판 [69]
02.File Book
File 자료실 [95]
Site Link [18]
개인폴더 [194]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [18]
MySQL [40]
DB2 [79]
ORACLE [2888]
PostgreSQL [103]
기타정보 [150]
운영체제 [577]
04.Q/A Book
Q/A [53]
05.방명록
방명록 [54]
레벨업 [37]
구인/구직 [2]

기념일
Search
LINK
+ 가족 Hompy
+ DNSEver
IOTN :: Work Book :: MySQL

 회원가입

mariadb 10.5 설치 URL
최길호 [LIST]   2020-10-27 21:08:54, 조회 : 512


https://mariadb.org/download/
https://downloads.mariadb.org/

https://idchowto.com/?p=55830
https://computingforgeeks.com/install-mariadb-on-centos-7-centos-8/

CentOS 8.2
http://ftp.kaist.ac.kr/CentOS/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso


Custom Operating System
Default : Server [ GUI ]

# DVD Mount
mount /dev/sr0 /mnt

cat > /etc/yum.repos.d/media.repo
[InstallMedia]
name=RedHat Linux 8
metadata_expire=-1
enabled=1
gpgcheck=0
baseurl=file:///run/media/root/RHEL-8-2-0-BaseOS-x86_64/AppStream
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


cat > /etc/yum.repos.d/media.repo
[InstallMedia]
name=RedHat Linux 8
metadata_expire=-1
enabled=1
gpgcheck=0
baseurl=file:///mnt/AppStream
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

# TimeZone
rm -fr /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

yum clean all
yum list
yum install createrepo -y
dnf install mariadb-server

chmod 644 /etc/yum.repos.d/media.repo

추가
DVD [ mariadb 10.3.17 ]
dnf install mariadb-server

====================================================================================================================================
Package                             Architecture    Version                                            Repository             Size
====================================================================================================================================
Installing:
mariadb-server                      x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia           16 M
Installing dependencies:
mariadb                             x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia          6.1 M
mariadb-common                      x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia           62 k
mariadb-connector-c                 x86_64          3.0.7-1.el8                                        InstallMedia          148 k
mariadb-connector-c-config          noarch          3.0.7-1.el8                                        InstallMedia           13 k
mariadb-errmsg                      x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia          232 k
perl-DBD-MySQL                      x86_64          4.046-3.module+el8.1.0+2938+301254e2               InstallMedia          156 k
Installing weak dependencies:
mariadb-backup                      x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia          6.0 M
mariadb-gssapi-server               x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia           50 k
mariadb-server-utils                x86_64          3:10.3.17-1.module+el8.1.0+3974+90eded84           InstallMedia          1.6 M
Enabling module streams:
mariadb                                             10.3                                                                          
perl-DBD-MySQL                                      4.046        

[ mariadb 10.5.6 ]
https://mirror.yongbok.net/mariadb//mariadb-10.5.6/yum/
https://mirror.yongbok.net/mariadb//mariadb-10.5.6/yum/rhel8-amd64/rpms/

# old version 제거
dnf remove mariadb-server

CentOS 8.2에서 관련된 파일 받아서 RedHat 8.2 설치 가능
[root@localhost maraidb-server]# yum install yum-utils
[root@localhost maraidb-server]# yumdownloader --resolve MariaDB-columnstore-engine-10.5.6-1.el8.x86_64.rpm
[root@localhost maraidb-server]# yumdownloader --resolve MariaDB-compat-10.5.6-1.el8.x86_64.rpm

RedHat 8.2
[root@localhost mariadb]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@localhost mariadb]# yum install *rpm
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 20:04:12 ago on Sat 31 Oct 2020 10:53:04 AM EDT.
Dependencies resolved.
====================================================================================================================================
Package                                       Architecture         Version                        Repository                  Size
====================================================================================================================================
Installing:
MariaDB-backup                                x86_64               10.5.6-1.el8                   @commandline               7.0 M
MariaDB-client                                x86_64               10.5.6-1.el8                   @commandline                13 M
MariaDB-columnstore-engine                    x86_64               10.5.6-1.el8                   @commandline               7.8 M
MariaDB-common                                x86_64               10.5.6-1.el8                   @commandline                87 k
MariaDB-compat                                x86_64               10.5.6-1.el8                   @commandline               2.2 M
MariaDB-connect-engine                        x86_64               10.5.6-1.el8                   @commandline               563 k
MariaDB-cracklib-password-check               x86_64               10.5.6-1.el8                   @commandline                12 k
MariaDB-devel                                 x86_64               10.5.6-1.el8                   @commandline               7.9 M
MariaDB-gssapi-server                         x86_64               10.5.6-1.el8                   @commandline                15 k
MariaDB-rocksdb-engine                        x86_64               10.5.6-1.el8                   @commandline               5.7 M
MariaDB-s3-engine                             x86_64               10.5.6-1.el8                   @commandline               887 k
MariaDB-server                                x86_64               10.5.6-1.el8                   @commandline                27 M
MariaDB-shared                                x86_64               10.5.6-1.el8                   @commandline               116 k
MariaDB-test                                  x86_64               10.5.6-1.el8                   @commandline                48 M
boost-filesystem                              x86_64               1.66.0-7.el8                   @commandline                48 k
compat-openssl10                              x86_64               1:1.0.2o-3.el8                 @commandline               1.1 M
expect                                        x86_64               5.45.4-5.el8                   @commandline               267 k
galera-4                                      x86_64               26.4.5-1.el8                   @commandline                13 M
libnsl                                        x86_64               2.28-101.el8                   @commandline                97 k
make                                          x86_64               1:4.2.1-10.el8                 @commandline               498 k
socat                                         x86_64               1.7.3.3-2.el8                  @commandline               302 k
tcl                                           x86_64               1:8.6.8-2.el8                  @commandline               1.1 M
Installing dependencies:
perl-Memoize                                  noarch               1.03-416.el8                   InstallMedia               118 k
perl-Time-HiRes                               x86_64               1.9758-1.el8                   InstallMedia                61 k
unixODBC                                      x86_64               2.3.7-1.el8                    InstallMedia               458 k

Transaction Summary
====================================================================================================================================
Install  25 Packages


rpm -qi  MariaDB-server
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb

grep mysql /etc/services
firewall-cmd --add-service=mysql --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload

vi /etc/my.cnf.d/server.cnf
# Listen on all available interfaces
bind-address=0.0.0.0

mysql_secure_installation
Enter current password for root (enter for none): 처음 설치 엔터
Switch to unix_socket authentication [Y/n] y
Change the root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

MariaDB [(none)]> SELECT VERSION();

cat >> /etc/security/limits.conf
* soft nproc 65536
* hard nproc 65536
* soft nofile 1048576
* hard nofile 1048576
* soft stack 10240

systemctl stop mariadb

mkdir /data
rsync -av /var/lib/mysql /data/
mv /var/lib/mysql /var/lib/mysql.bak

cat >> /etc/my.cnf.d/client.cnf
[client]
default-character-set=euckr

cat >> /etc/my.cnf.d/mysql-clients.cnf
[mysql]
default-character-set=euckr
[mysqldump]
default-character-set=euckr


vi /etc/my.cnf
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
socket=/tmp/mysql.sock
#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d
#
[mysqld]
datadir=/data/mysql
innodb_buffer_pool_size = 4G
log_bin=on
expire_logs_days=14
lower_case_table_names=1
max_allowed_packet=2G
max_connections=2000
character-set-server=utf8
collation-server=utf8_unicode_ci
init_connect = set collation_connection = utf8_unicode_ci
init_connect = set names utf8
long_query_time = 1
slow_query_log = 1
slow_query_log_file=/tmp/mariadb.slow.log

systemctl start mariadb

SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_size';

mysql -uroot

select @@datadir;
select @@socket;

select user,host from mysql.user where user='root';
+------+-----------+
| User | Host      |
+------+-----------+
| root | localhost |
+------+-----------+
use mysql;
alter user 'root'@'localhost' identified by 'RootP@ssw0rd';
flush privileges;

create database webdb default character set utf8 ;
alter database webdb COLLATE 'euckr_korean_ci';
show databases;
use webdb
create user webadmin identified by 'Web@dmin';
create user webdb identified by 'WebDB12#';
grant all privileges on *.* to webadmin;
grant all privileges on webdb.* to webdb;
select user,host from mysql.user;
flush privileges;

export LANG=ko_KR.eucKR
mysql -uwebdb -pWebDB12# webdb
use webdb
set names euckr;
create table 한글 ( 한글 text);
insert into 한글 values ('한글');
select * from 한글;

## backup
export LANG=ko_KR.eucKR
mkdir /data/backup
find /data/backup -type f -mtime +1 -exec rm -fr {} \;
mysqldump -uroot -pRootP@ssw0rd --default-character-set=euckr --all-databases -r /data/backup/full.`date +%y%m%d`.sql

cat >> /etc/my.cnf
[mariabackup]
user=root
## binary backup
mariabackup --backup --target-dir=/data/backup

## root 로그인,암호 처리
set password = password("admin!78");
flush privileges;

use mysql;
select user,host from mysql.user ;
-- 암호 특수문자,숫자포함 9자
alter user 'root'@'localhost' identified by 'admin!78';
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
alter user 'root'@'localhost' identified by 'admin!789';
Query OK, 0 rows affected (0.007 sec)

-- root 원격 로그인 enable
grant all privileges on *.* to 'root'@'%' identified by 'admin!789';
-- root 원격 로그인 disable
delete from mysql.user where user='root' and host='%';

select user,host from mysql.user ;
flush privileges;

튜닝
https://jsonobject.tistory.com/408



  LIST

Copyright 1999-2022 Zeroboard / skin by 최길호(gilho.kr@gmail.com)
최근 댓글
2008/12/15
MySQL이 안좋은건가? 장애도 쉽게 나고,...
by 최길호
최근 게시물
06/29
[ORACLE]
DDE: Problem Key 'ORA 600 [133....
by 최길호
06/25
[ORACLE]
Replication may not be valid i....
by 최길호
06/22
[운영체제]
CentOS7 홈페이지 Migration 메모.
by 최길호