티스토리 뷰
1. 먼저 MariaDB 저장소를 추가
vi /etc/yum.repos.d/MariaDB.repo
다음 내용을 입력 후 저장
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2. 설치를 진행
yum install MariaDB-server MariaDB-client
3. MariaDB 실행및 서비스 등록
systemctl enable mariadb
systemctl start mariadb
4. MYSQL에 접속
mysql -u root mysql
5. 관리자 비번 변경
SET PASSWORD FOR root@localhost=PASSWORD('새로운 패스워드');
FLUSH PRIVILEGES;
6. 기존 DB및 관리자 삭제
drop database test;
use mysql;
delete from db;
delete from user where not (host="localhost" and user="root");
flush privileges;
7. root계정 변경
update user set user="사용할아이디" where user="root";
flush privileges;
'Centos7' 카테고리의 다른 글
[Nginx] Redirect 설정 (0) | 2017.02.23 |
---|---|
[Centos7] PHP7 설치 (0) | 2017.02.23 |
[Centos7] Nginx 설치 (0) | 2017.02.23 |
[Centos7] yum update (0) | 2017.02.23 |
[Centos7] Kernel 업데이트 (0) | 2017.02.23 |