메뉴 건너뛰기

조회 수 5252 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
## MySQL root 패스워드 분실시

■ Windows 플랫폼

일단 실행되고 있는 MySQL 데몬을 종료 하여야 합니다.

작업 관리자(Ctrl+Shift+Esc) 또는 Ctrl+Alt+Del 을 실행시켜서
mysqld.exe 또는 mysqld-nt.exe 를 찾아서 프로세스 종료 해주신 다음 아래의 방법대로 작업
하시기 바랍니다.

MS-DOS 창을 열어서

Windows 98 :: 시작 -> 실행 -> command
Windows NT :: 시작 -> 실행 -> cmd

MySQL 이 설치된 디렉토리로 이동하신다음


mysqld.exe --skip-grant


다음과 같이 승인 절차를 거치지 않도록 MySQL 데몬을 실행합니다.

또 다른 MS-DOS 창을 열어서 MySQL 이 설치된 디렉토리에서 아래와 같이 실행 합니다.


mysql.exe

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.14-max-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed
mysql> UPDATE user SET password=PASSWORD('변경할패스워드') where user='root';
Query OK, 0 rows affected (0.14 sec)
Rows matched: 1 Changed: 0 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.11 sec)

mysql> quit
Bye


이젠 먼저 MySQL 데몬을 실행한 도스창을 닫으시고
정상적으로 MySQL 데몬을 실행하시면 변경할패스워드 로 MySQL root 패스워드가 변경되
었습니다.

■ UNIX 플랫폼

MySQL 이 실행되고 있다면


[root@ns /root]# mysql.server stop

또는

[root@ns /root]# killall mysqld

위와 같은 방법으로 MySQL 데몬을 종료 합니다.

이제 승인 절차를 거치지 않도록 MySQL 데몬을 실행합니다.


[root@ns /root]# safe_mysqld --skip-grant &


이제 MySQL root 패스워드를 변경합니다.


[root@ns /root]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2918080 to server version: 4.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed
mysql> UPDATE user SET password=PASSWORD('변경할패스워드') where user='root';
Query OK, 0 rows affected (0.14 sec)
Rows matched: 1 Changed: 0 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.11 sec)

mysql> quit
Bye


이제 MySQL 데몬을


[root@ns /root]# killall safe_mysqld


위와 같이 종료 하시고 다시 실행시켜 주시면 변경된 패스워드로 동작 합니다


  1. No Image 12Apr
    by
    2017/04/12 Views 5272 

    테이블 타입(Heap, MyIsam, InnoDB...) 변경하기

  2. No Image 12Apr
    by
    2017/04/12 Views 6053 

    MySQL 쿼리 결과 값 세로로 보기

  3. No Image 12Apr
    by 조쉬
    2017/04/12 Views 5252 

    MySQL root 패스워드 분실시

  4. No Image 12Apr
    by
    2017/04/12 Views 5727 

    MySQL 에서 랜덤(random)으로 레코드 읽어오기

  5. No Image 12Apr
    by
    2017/04/12 Views 5330 

    MySQL 손상된 테이블 복구

  6. No Image 12Apr
    by
    2017/04/12 Views 5392 

    [MySQL] 백업 및 복구

  7. No Image 12Apr
    by
    2017/04/12 Views 5105 

    MySQL의 alter table 명령어 모음

  8. No Image 12Apr
    by
    2017/04/12 Views 5365 

    mySQL 에서 날자표현 방법

  9. No Image 12Apr
    by
    2017/04/12 Views 5621 

    MySQL에서 원격 IP 접속 허용하기

  10. No Image 12Apr
    by
    2017/04/12 Views 5885 

    MySQL에서 사용자 권한 주기 (grant 명령어)

  11. No Image 12Apr
    by
    2017/04/12 Views 5008 

    MySQL 계정생성하기

  12. No Image 12Apr
    by
    2017/04/12 Views 7316 

    실수로 삭제한 mysql DB 복구방법

  13. No Image 23Dec
    by
    2016/12/23 Views 5809 

    IN 연산자

  14. No Image 23Dec
    by
    2016/12/23 Views 6085 

    필드 변경, 추가, 삭제

  15. No Image 23Dec
    by
    2016/12/23 Views 5534 

    데이타베이스 또는 테이블 정보

  16. No Image 23Dec
    by
    2016/12/23 Views 5783 

    테이블 복사, 테이블 비우기

  17. No Image 23Dec
    by
    2016/12/23 Views 5440 

    IMPORT

  18. No Image 23Dec
    by
    2016/12/23 Views 5635 

    덤프할때 한글깨짐 해결

  19. No Image 23Dec
    by
    2016/12/23 Views 6012 

    Create Procedure

  20. No Image 23Dec
    by
    2016/12/23 Views 7478 

    테이블 체크, 백업

Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved