Reset the Root Password of MySQL Server 리셋의 루트 비밀 번호를 반환한다

By default, MySQL Server will be installed with root superuser without any password. 기본적으로, 반환한다 루트 슈퍼유저없이 비밀 번호와 함께 설치됩니다. You can connect to MySQL server as root without requiring password or by keying in blank password. 루트로 연결할 수있습니다 반환한다 키에 의해 비밀 번호 또는 빈 암호를 필요로하지 않고있습니다. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root password for MySQL. 그러나, 비밀 번호를 설정하는 경우에는 루트 및 비밀 번호를 잊어하거나 리콜 수없습니다, 그럼 당신의 루트에 대한 암호를 재설 정할 mysql이 필요합니다.

MySQL Reference Manual has detail steps on how to reset password for root which are as below: mysql 레퍼런스 매뉴얼은 비밀 번호를 다시 설정하는 방법에 대한 자세한 단계를 다음과 같이 루트가 :

The procedure under Windows: 아래의 절차 윈도우 :

  1. Log on to the Windows system where MySQL is running as Administrator. 창 체계에 로그온 관리자 권한으로이 실행되고있는 mysql합니다.
  2. Stop the MySQL server if it is running. 반환한다 실행중인 경우를 중지합니다. For a server that is running as a Windows service, go to the Services manager: windows를 실행하는 서버에 대한 서비스, 이동 서비스 매니저 :

    Start Menu -> Control Panel -> Administrative Tools -> Services 시작 메뉴 -> 제어판 "-> 관리 도구 -> 서비스

    Then find the MySQL service in the list, and stop it. 다음의 목록을 찾을 서비스에 mysql, 그리고 멈춰합니다.

    If your server is not running as a service, you may need to use the Task Manager to force it to stop. 귀하의 서버가 서비스로 실행하지 않는 경우해야 할 수도있습니다을 사용하여 작업 관리자를 강제로 그것을 중지합니다.

  3. Create a text file and place the following command within it on a single line: 텍스트 파일을 만듭니다 다음과 같은 명령을 시간과 장소에 하나의 라인 :

    SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’MyNewPassword’); 비밀 번호를 설정 '루트'@ '로컬'= 비밀 번호 ( 'mynewpassword');

    Save the file with any name. 임의의 이름에서 파일을 저장합니다. For this example the file will be C:\mysql-init.txt. 이 예제 파일은 c : \ mysql - init.txt합니다.

  4. Open a console window to get to the DOS command prompt: 콘솔 창을 열어 도스 명령 프롬프트를 얻기 위해선 :

    Start Menu -> Run -> cmd 시작 메뉴 -> 실행 -> cmd

  5. If MySQL is installed in C:\mysql. mysql에 설치되어있는 경우 c : \ mysql합니다. If MySQL is installed in another location, adjust the following commands accordingly. 다른 위치에 mysql에 설치되어있는 경우, 다음과 같은 명령을 적절히 조절합니다.

    At the DOS command prompt, execute this command: 도스에서 명령 프롬프트에서이 명령을 실행 :

    C:\> C:\mysql\bin\mysqld-nt –init-file=C:\mysql-init.txt c : \> c : \ mysql \ 빈 \ mysqld - nt - init - 파일 = c : \ mysql - init.txt

    The contents of the file named by the –init-file option are executed at server startup, changing the root password. 라는 이름의 파일의 내용을 - init - 파일 옵션을 실행하는 서버에서 시작, 루트 암호를 변경합니다. After the server has started successfully, you should delete C:\mysql-init.txt. 서버가 성공적으로 시작 후 삭제해야합니다 c : \ mysql - init.txt합니다.

    If you installed MySQL using the MySQL Installation Wizard, you may need to specify a –defaults-file option: mysql을 설치한 경우 빠른 설치 마법사를 사용하는 경우 - 기본 - 파일 옵션을 지정해야합니다 :

    C:\> “C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe” c : \> "c : \ 프로그램 파일 \ mysql \ 반환한다 5.0 \ 빈 \ mysqld - nt.exe"
    –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.0\my.ini” - 기본 - 파일 = "c : \ 프로그램 파일 \ mysql \ 반환한다 5.0 \ my.ini"
    –init-file=C:\mysql-init.txt - init - 파일 = c : \ mysql - init.txt

    The appropriate –defaults-file setting can be found using the Services Manager: - 파일의 설정에 적절한 - 기본값을 사용하여 서비스 관리자를 찾을 수있습니다 :

    Start Menu -> Control Panel -> Administrative Tools -> Services 시작 메뉴 -> 제어판 "-> 관리 도구 -> 서비스

    Find the MySQL service in the list, right-click on it, and choose the Properties option. mysql 서비스를 찾을 목록에서 오른쪽 - 클릭하고 등록 정보 옵션을 선택합니다. The Path to executable field contains the –defaults-file setting. 필드에 대한 경로를 실행 파일 - 파일을 설정을 포함하는 -의 기본값합니다. Be sure to supply the –init-file argument with the full system path to the file, regardless of your current working directory - init - 파일을 제공하기 위해 반드시 인수를 파일의 전체 시스템 경로에 관계없이 귀하의 현재 작업 디렉토리

  6. Stop the MySQL server, then restart it in normal mode again. 반환한다 중지 후 다시 일반 모드에서 다시 시작합니다. If the MySQL server is ran as a service, start it from the Windows Services window. 이 경우에는 반환한다 몫 서비스로 서비스를 시작합니다들 창문에서 창문합니다. If you start the server manually, use whatever command you normally use. 서버를 수동으로 시작하는 경우, 어떤 명령을 사용 일반적으로 사용합니다.
  7. Connect to MySQL server by using the new password. 새 비밀 번호를 사용하여 연결을 반환한다.

For Unix environment, the procedure for resetting the root password is as follows: 유닉스 환경에서는 루트 암호를 재설 정한 절차에 대해는 다음과 같습니다 :

  1. Log on to the Unix system as either the Unix root user or as the same user that the mysqld server runs as. 유닉스 시스템에 로그온합니다 중 하나를 유닉스로 루트 사용자 또는 mysqld 서버에 같은 사용자로 실행을합니다.
  2. Locate the .pid file that contains the server’s process ID. 를 찾습니다. pid 파일이 들어있는 서버의 프로세스 번호합니다. The exact location and name of this file depend on your distribution, hostname, and configuration. 해당 파일의 정확한 위치와 이름에 따라 달라집니다 유통, 호스트 이름, 및 구성합니다. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. 일반적인 위치는 / 변수 / lib / mysql /, / 변수 / 실행 / mysqld /, / usr / 지방 / mysql / 데이터 /합니다. Generally, the filename has the extension of .pid and begins with either mysqld or the system’s hostname. 일반적으로, 파일의 확장자를합니다. pid와 mysqld 중 하나 또는 시스템의 호스트로 시작합니다.

    Stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command: 정상적인 살해를 중지합니다 전송하여 반환한다 (죽이지 -9)을 mysqld 프로세스를 사용하여 경로를합니다. pid 파일에 다음과 같은 명령 :

    shell> kill `cat /mysql-data-directory/host_name.pid` 쉘> 죽이기`고양이 / mysql-data-directory/host_name.pid`

    Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command. 인용 부호의 사용을 참고로 고양이가 명령을 전달보다는 backticks; 이러한 원인이 출력은 고양이를 죽이는 명령으로 대체합니다.

  3. Create a text file and place the following command within it on a single line: 텍스트 파일을 만듭니다 시간과 장소에 다음과 같은 명령을 하나의 라인 :

    SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’MyNewPassword’); 비밀 번호 설정 '루트'@ '로컬'= 비밀 번호 ( 'mynewpassword');

    Save the file with any name. 임의의 이름에서 파일을 저장합니다. For this example the file will be ~/mysql-init. 이 예제 파일을 ~ / mysql - init합니다.

  4. Restart the MySQL server with the special –init-file=~/mysql-init option: 를 다시 시작합니다을 반환한다 특별 - init - 파일 = ~ / mysql - init 옵션 :

    shell> mysqld_safe –init-file=~/mysql-init & 쉘> mysqld_safe - init - 파일 = ~ / mysql - init &

    The contents of the init-file are executed at server startup, changing the root password. init - 파일의 내용을 서버가 실행을 시작, 루트 암호를 변경합니다. After the server has started successfully you should delete ~/mysql-init. 서버가 성공적으로 시작 후 삭제해야합니다 ~ / mysql - init합니다.

  5. Connect to MySQL server by using the new password. 새 비밀 번호를 사용하여 연결을 반환한다.

Alternatively, on any platform, mysql client can be used to set the new password, althought it’s less secure way of resetting the password (detailed instruction 다른 방법은, 모든 플랫폼, mysql 클라이언트를 사용하여 새 비밀 번호를 설정합니다, 그러나 이것을 재설정 방법을 덜 안전한 비밀 번호 (세부 지침 here 여기에 ): ) :

  1. Stop mysqld and restart it with the –skip-grant-tables –user=root options (Windows users omit the –user=root portion). 그것을 중지하고 다시 시작 mysqld - 생략 - 그랜트 - 테이블 - 사용자 = 루트 옵션 (윈도우 유저 - 사용자 = 루트 부분을 생략합니다).
  2. Connect to the mysqld server with this command: 이 명령에 연결하여 서버와 mysqld :

    shell> mysql -u root 쉘> mysql - u 루트

  3. Issue the following statements in the mysql client: 문제를 다음과 같은 문장을 mysql 클라이언트 :

    mysql> UPDATE mysql.user SET Password=PASSWORD(’newpwd’) mysql> 업데이 트를 mysql.user = 비밀 번호를 비밀 번호 설정 ( 'newpwd')
    -> WHERE User=’root’; -> 여기서 사용자 = '루트';
    mysql> FLUSH PRIVILEGES; mysql> 플러시 권한을;

    Replace ‘newpwd’ with the actual root password that you want to use. 대체 'newpwd'를 실제로 사용하려는 루트 비밀 번호를합니다.

  4. You should be able to connect using the new password. 당신의 새 비밀 번호를 사용하여 연결할 수 있어야합니다.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 중요 사항 : 이것은 기계 번역 페이지는 "있는 그대로"제공하지 않고 보증합니다. Machine translation may be difficult to understand. 기계 번역을 이해하기 어려울 수있습니다. Please refer to 를 참조하시기 바랍니다 original English article 기존 영어 자료 whenever possible. 언제 수있습니다.

Share and contribute or get technical support and help at 를 공유하고 기술 지원 및 도움을 공헌하지 않는다면 My Digital Life Forums 내 디지털 라이프 공개 토론 . 합니다.


10 Responses to “Reset the Root Password of MySQL Server” 10 응답을 "재설정의 루트 비밀 번호를 반환한다"

  1. Change and Reset MySQL root Password » My Digital Life mysql 루트 암호를 변경 및 재설정»내 디지털 라이프
    June 6th, 2006 18:12 2006년 6월 6일 18시 12분
    1

    [...] Other then the ways specified here to reset and change the root password for mySQL database in the case that the password is forgotten or lost, the following instructions explain in details the alternative way at the last part of the guide, where no additional file needs to be created: [...] [...] 다른 방법으로 다음의 루트 지정 및 변경에 대한 암호를 재설 정할 여기에 mysql 데이터베이스의 비밀 번호를 잊어버린이나 분실의 경우는 다음과 같은 지침을 설명하고 다른 방법을 자세히 설명합니다 마지막 부분의 가이드, 어디 추가 파일을 만들 필요가없습니다 : [...]

  2. Mike Scalora 마이크 scalora
    October 8th, 2007 03:47 2007년 10월 8일 03:47
    2

    You should add –verbose –console to the command in step 5. - 자세한 정보 - 콘솔을 추가해야 5 단계에서의 명령합니다. I got a error because of a copy and paste issue that include a quote of the wrong type but there’s no error feedback without the –console. 이 있어요 오류로 인해 문제를 복사 및 붙여넣기의 잘못된 유형에 대한 견적을 포함하지만 그것도 오류가 의견 - 콘솔을하지 않고있습니다. Also, the -console to stop the server with CTRL-C under windows, not sure about linux. 또한, 서버와 ctrl - 콘솔을 중지합니다 - c 윈도우가 아닌 리눅스 확신합니다.

    -Mike - 마이크

  3. Roar 포효
    April 23rd, 2008 23:38 2008년 4월 23일 23시 38분
    3

    This isn’t correct. 이것은 올바르지 않습니다. The syntax should be “–init” not “-init”. 의 구문해야 "- init"안 "- init".

  4. Roar 포효
    April 23rd, 2008 23:39 2008년 4월 23일 23시 39분
    4

    Ah and now that I’ve posted I see the problem. 아 그리고 이제는 나는이 보이 네요 문제를 게시했습니다. This site is disallowing double “-”. 이 사이트는 허용 더블 "-". It’s being escaped or something. 이스케이프라도 우리가합니다.

    Well dear reader, just now that “-init” should have TWO dashes (hyphens), not one. 잘 친애하는 지도자가 바로 지금 "- init"는 두 개의 대시 (하이픈), 한.

  5. Roar 포효
    April 23rd, 2008 23:39 2008년 4월 23일 23시 39분
    5

    Gah. 이런합니다. “know” not “now”. "잘 알고,"아니오 "로한다". I’m going for coffee now. 지금 나는 커피를 마시 간다.

  6. Rob
    April 24th, 2008 10:05 2008년 4월 24일 10:05
    6

    Dude, 녀석,

    Didn’t see these comments while reading the article, but I figured out the double-hyphen syntax by trial and error. 이 문서 이러한 의견을 읽는 동안 몰랐지만 더블 - 하이픈 구문을 파악해 시행 착오를합니다.
    Anyway you saved my Life by putting this documentation on the Net !! 어쨌든이 문서에 놓음으로써 내 생명을 구해 그물! A thousand thanks ! 1000 감사합니다! -Rob - 롭

  7. Dan
    April 25th, 2008 01:37 2008년 4월 25일 01:37
    7

    There is a typo on the mysqld startup script. mysqld에 오타가 시작 스크립트를합니다.

    The correct command requires TWO dashes before the parameter setting. 올바른 명령을 매개 변수를 설정하기 전에 두 개의 대시가 필요합니다.

    The correct command is (note TWO dashes before skip-grant-tables): 올바른 명령은 (참고 사항 건너뛰기 - 그랜트 - 테이블을하기 전에 두 개의 대시) :

    mysqld_safe –skip-grant-tables - 생략 - 그랜트 - 테이블을 mysqld_safe

  8. Kamal BAKOUR 카말 bakour
    July 31st, 2008 21:18 2008년 7월 31일 21:18
    8

    Procdure to reset root password in MySQL [RedHat & Fedora] 루트 암호를 재설 정할 procdure mysql [레드햇 & 중절모]

    ====================================================== ================================================== ====
    Step-1 단계 - 1
    [root@redhat~]#killall mysqld [루트 @ 레드햇 ~] # killall mysqld
    [root@redhat~]#/usr/libexec/mysqld –skip-grant-tables –user=root & [루트 @ 레드햇 ~] # / usr / libexec / mysqld - 생략 - 그랜트 - 테이블 - 사용자 = 루트 &

    ====================================================== ================================================== ====
    Step-2 (In MySQL) - 2 단계 (mysql)
    [root@redhat~]#mysql [루트 @ 레드햇 ~] # mysql
    use mysql; mysql을 사용;
    update user set password=password(”newpassowrd”) where user=”root”; 업데이 트를 사용자 설정 비밀 번호를 = 비밀 번호를 ( "newpassowrd") 어디에 사용자 = "루트";
    flush privileges; 플러시 권한을;
    exit; 출구;

    ====================================================== ================================================== ====
    Step-3 - 3 단계
    [root@redhat~]#killall mysqld [루트 @ 레드햇 ~] # killall mysqld
    [root@redhat~]#/etc/init.d/mysqld start [루트 @ 레드햇 ~] # / 비고 / init.d / mysqld 시작

    There you go 여기요 :)

  9. Jose 호세
    August 14th, 2008 10:47 2008년 8월 14일 10:47
    9

    phpmyadmin

  10. Rob
    September 9th, 2008 07:34 2008년 9월 9일 07:34
    10

    Completely wrong syntax, check the code before posting guy 완전히 틀린 문법, 게시하기 전에 사람의 코드를 확인

Leave a Reply 남길 회신

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 이러한 태그를 사용할 수있습니다 : <a href="" title=""> <acronym title=""> <abbr title=""> <blockquote cite=""> <b> <cite> <code> <델 날짜 = ""> <em> <i> <strike> '<q cite="">

Subscribe without commenting 논평없이 구독 신청
이메일


New Articles 새로운 기사

Incoming Search Terms for the Article 이 문서에 대한 검색어를 수신

reset mysql password mysql 비밀 번호를 재설정 - - mysql forgot password mysql 비밀 번호 분실 - - mysql forgot root password mysql 루트 암호를 잊으 - - MySQL remove root password mysql 루트 암호를 제거 - - remove mysql password 비밀 번호를 제거하는 mysql - - mysql default password mysql 기본 비밀 번호 - - mysql reset password mysql 비밀 번호 재설정 - - mysql reset root password mysql 루트 암호를 재설정 - - xampp mysql password mysql 비밀 번호를 부전승 - - forget mysql password mysql 비밀 번호를 잊어 - - mysql remove password mysql 제거하는 비밀 번호를 - - mysql reset root mysql를 재설정 루트 - - default mysql password 기본 mysql 비밀 번호를 - - reset password mysql 비밀 번호 재설정 mysql - - ubuntu mysql root password mysql 루트 암호를 우분투 - - xampp default password 부전승 기본 비밀 번호 - - remove mysql root password mysql 루트 암호를 제거 - - remove password mysql 삭제 비밀 번호를 mysql - - lost mysql password windows mysql 비밀 번호를 분실 windows - - mysql password reset mysql 비밀 번호 재설정 - - reset xampp password 부전승 비밀 번호를 재설정 - - xampp reset password 비밀 번호 재설정 부전승 - - recover mysql password mysql 비밀 번호를 복구할 - - resetting mysql password mysql 비밀 번호를 재설정 - - forgot password mysql mysql 비밀 번호 분실 - - mysql lost password windows mysql 비밀 번호 분실 windows - - mysql forget password mysql 비밀 번호를 잊으셨습니까 - - mysql root password recovery mysql 루트 비밀 번호 복구 - - xampp forgot password 부전승 비밀 번호 분실 - - resetting mysql root password mysql 루트 암호를 재설정 - - mysql password forgot mysql 비밀 번호를 잊었 - - xampp reset mysql password mysql 비밀 번호를 재설정 부전승 - - delete mysql password mysql 비밀 번호를 삭제 - - reset mysql password windows mysql 비밀 번호를 재설정 windows - - Recover MySQL root password Windows mysql 루트 암호를 복구하는 windows - - removing mysql password 비밀 번호를 제거하는 mysql - - reset mysql root password windows mysql 루트 암호를 재설정 windows - - how to remove mysql password mysql 비밀 번호를 제거하는 방법 - - reset mysql root mysql 루트를 재설정 - - how to reset MySQL password mysql 비밀 번호를 다시 설정하는 방법 - - forgot mysql root password mysql 루트 암호를 잊으 - - remove root password mysql 루트 암호를 제거 mysql - - mysql forgotten password mysql 패스워드를 잊으 셨어요 - - find mysql password mysql 비밀 번호를 찾아 - - xampp mysql root password mysql 루트 암호를 부전승 - - mysql password recovery mysql 비밀 번호 복구 - - mysql recover root password mysql 루트 암호를 복구할 - - forget password mysql 비밀 번호를 잊으셨습니까 mysql - - mysql password windows mysql 비밀 번호를 windows - - xampp mysql default password 부전승 mysql 기본 비밀 번호 - - reset root password mysql mysql 루트 암호를 재설정 - - reset root password mysql windows mysql 루트 암호를 재설정 windows - - mysql reset root password windows mysql 루트 암호를 재설정 windows - - mysql password forget mysql 비밀 번호를 잊어 - - mysql 5 default password mysql 5 기본 비밀 번호 - - forgot password for mysql 비밀 번호를 잊었 mysql - - mysql removing root password mysql 루트 암호를 제거 - - recover mysql password windows mysql 비밀 번호를 복구할 windows - - mysql windows lost password windows mysql 비밀 번호 분실 - - windows mysql password windows mysql 비밀 번호를 - - all 모두 - - forgot xampp password 비밀 번호를 잊었 부전승 - - xampp default mysql password 기본 mysql 비밀 번호를 부전승 - - mysql 5.0 default password mysql 5.0의 기본 비밀 번호 - - mySQL recover password windows 비밀 번호 복구 mysql windows - - reset mysql root password mysql 루트 암호를 재설정 - - recover mysql root password 루트 암호를 복구하는 mysql - - remove password in mysql 비밀 번호를 제거하는 mysql - - xampp password mysql 부전승 비밀 번호를 mysql - - mysql 5 reset root password mysql 루트 암호를 재설정 5 - - removing mysql root password mysql 루트 암호를 제거 - - xampp password reset 부전승 비밀 번호 재설정 - - removing root password mysql 루트 암호를 제거 mysql - - reset mysql password xampp mysql 비밀 번호를 재설정 부전승 - - mysql5 default password 기본 비밀 번호를 mysql5 - -