✔ MySQL Server
◾ MySQL 설치 및 설정
1. https://downloads.mysql.com/archives/community/
MySQL :: Download MySQL Community Server (Archived Versions)
Please note that these are old versions. New releases will have recent bug fixes and features! To download the latest release of MySQL Community Server, please visit MySQL Downloads. MySQL open source software is provided under the GPL License.
downloads.mysql.com

RPM Bundle 링크 주소 복사
wget https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar
2. 파일 이동 및 풀기
# mkdir -p /usr/local/src/mysql8
# mv *.tar /usr/local/src/mysql8
# cd /usr/local/src/mysql8
# tar xf mysql-8.0.17.~.tar
3. 설치
# yum erase mariadb* -y
# yum install -y openssl-devel net-tools
common → libs → devel → client → server 순서대로 설치

4. 실행
# systemctl restart mysqld
# systemctl enable mysqld
5. 초기 비밀번호 확인
# cat /var/log/mysqld.log | grep temporary
# 비밀번호 복사

6. mysql 접속
# mysql -u [유저명] -p
# 초기 비밀번호 붙여넣기

7. 비밀번호 변경
> alter user 'root'@'localhost' identified by 'Busanit1@';
'root'@'localhost' : 계정
'Busanit1@' : 패스워드

8. 원격 접속 용 계정 생성
> create user 'root'@'192.168.56.1' identified by 'Busanit1@';
> grant all privileges on to *.* 'root'@'192.168.56.1' with grant option;
* : DB
* : Table
※ 'root'@'192.168.56.%' : 192.168.56.x 아이피에서 접속 하는 root
※ 'root'@'%' : 모든 아이피에서 접속 하는 root
'Linux' 카테고리의 다른 글
untangle (0) | 2024.08.21 |
---|---|
IPTABLES (0) | 2024.08.07 |
CentOS 7 - HTTPS (0) | 2024.07.29 |
CentOS 7 - DNS Server (0) | 2024.07.22 |
CentOS 7 - WEB Server (0) | 2024.07.22 |