반응형
1. mysqld_safe 를 통한 초기화
1) 실행중인 MySQL 서비스 중지
# /etc/init.d/mysqld stop |
2) 설정 (패스워드를 검사하지 않음)
# /usr/local/mysql/bin/mysqld_safe --skip-grant |
3) 새로운 패스워드 지정
mysql> update user set password=password('변경할 패스워드') where user='root'; mysql> flush privileges;. # /etc/init.d/mysqld restart # mysql -u root -p Enter password: |
2. my.cnf 수정을 통한 초기화
1) 실행중인 MySQL 서비스 중지
# /etc/init.d/mysqld stop |
2) my.cnf 설정
# vi /etc/my.cnf \\ 아랫줄 넣기
# /etc/init.d/mysqld restart # mysql -u root -p Enter password: |
반응형
'서버 & 시스템 > Linux' 카테고리의 다른 글
| phpMyAdmin 설치 및 설정 (0) | 2017.10.10 |
|---|---|
| MySQL 데이터베이스 백업 및 복원 (0) | 2017.10.05 |
| rsync 사용하기 (0) | 2017.10.05 |
| apache php 확장 모듈 설치 (0) | 2017.10.03 |
| Centos 6 APM 설치 (apache, php, mysql) (0) | 2017.10.03 |