메뉴 건너뛰기

조회 수 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. MySQL 대용량 DBMS 개선 사례

    Date2017.12.28 Views8013
    Read More
  2. mysql 날짜 관련 date_add, date_format

    Date2016.12.23 Views5500
    Read More
  3. MYSQL 기초문법&예제&문제 2

    Date2021.03.27 Views136
    Read More
  4. MYSQL 기초문법&예제&문제

    Date2021.03.27 Views156
    Read More
  5. Mysql 기본 명령어

    Date2014.02.27 Views5693
    Read More
  6. MySQL 계정생성하기

    Date2017.04.12 Views5008
    Read More
  7. MySQL Table 복구 - Got error 127 from storage engine

    Date2018.07.24 Views4367
    Read More
  8. mysql table 값 변경 mariadb 테이블 값 변경

    Date2023.01.12 Views83
    Read More
  9. MySQL Shard 데이터 재분배

    Date2017.11.28 Views4950
    Read More
  10. MYSQL select 명령문의 조합 &union 예제&문제 8

    Date2021.03.27 Views138
    Read More
  11. MySQL root 패스워드 분실시

    Date2017.04.12 Views5252
    Read More
  12. MySQL Replication 설정(Master-Slave, Maste

    Date2014.02.27 Views6782
    Read More
  13. MySQL replication SQL 문 실행 오류 해결 방법

    Date2018.07.18 Views1608
    Read More
  14. MySQL ORDER BY 조건별 필드 및 ASC DESC

    Date2019.01.08 Views4422
    Read More
  15. MYSQL order by 예제&문제 7

    Date2021.03.27 Views126
    Read More
  16. Mysql Join 해부(Left, Right, Outer, Inner Join)

    Date2017.11.28 Views5340
    Read More
  17. Mysql Join 해부(Left, Right, Outer, Inner Join

    Date2018.10.02 Views1276
    Read More
  18. MySQL JOIN 걸어서 UPDATE 하기

    Date2017.04.12 Views5352
    Read More
  19. MySQL INSERT 성능 향상

    Date2016.12.22 Views11523
    Read More
  20. MYSQL IN&BETWEEN&NULL&예제&FROM절 문제3

    Date2021.03.27 Views104
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

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

© k2s0o1d4e0s2i1g5n. All Rights Reserved