This is a translated page. The original can be found here: http://iwebdevel.com/2009/06/08/wordpress-easily-reset-your-account-password-using-mysql-and-php/
UPDATES VIA RSS | Email 업데이 트를 통해 RSS | 이메일 Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Wordpress: Easily Reset Your… / 코딩 / MySQL은 / PHP는 / Wordpress : 쉽게 재설정 네 ...

Wordpress: Easily Reset Your Account Password Using MySQL and PHP WordPress의 : 쉽게 귀하의 계정에 비밀 번호를 MySQL과 PHP를 사용하여 재설정

Posted on 08. 08 게시됨. Jun, 2009 by Dragos in Coding , MySQL , PHP 6 월, 2009 코딩, 마이 SQL, PHP로의 드라 고스에 의해

I've just forgot my admin password on my local testing blog, and what is worse – my local machine is not configured to send external email. 난 그냥 내 로컬 테스트를 블로그에 내 관리자 비밀 번호를 잊었는데, 무엇을 더입니다 - 내 로컬 컴퓨터의 외부 이메일을 보내도록 구성되지 않았습니다. Oh yeah, got to reinstall wordpress again, what a pity. 오, 그래, 다시, 어떻게 WordPress의 동정을 다시 설치 해. No way! 말도 안돼! There are two ways of resetting your password using two easy methods. 두 가지 쉬운 방법을 사용하여 비밀 번호를 재설정의 두 가지가있습니다. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. 당신은 PHP 나 cPanel의 기본 지식 + phpMyAdmin이 필요합니다.

I Method: CPanel+PHPMyAdmin 내가 방법 : cPanel + phpMyAdmin

For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. 이 방법을 들어, 귀하의 호스트 cPanel와 phpMyAdmin 설치가 필요합니다. If your host doesn't have these pieces of software, but something similar to these, you can follow this tutorial and apply these steps to your situation. 만약 여러분의 호스트 소프트웨어는 이러한 재료를 가지고 있지 않지만, 뭔가이 비슷한, 당신은이 튜토리얼 및 상황에 따라 다음 단계를 적용할 수있습니다.

First we'll need to open the PHPMyAdmin page. 우선 phpMyAdmin 페이지를 엽니다해야합니다. From the CPanel root page, launch PHPMyAdmin. cPanel 루트 페이지에서, 발사 phpMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. phpMyAdmin의 아이콘 중 하나와 유사한 아래의 스크린샷을 강조 보일 것입니다.

PHPMyAdmin

PHPMyAdmin phpMyAdmin

Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. 일단 phpMyAdmin의 데이터베이스를 설치할 때 워드 프레스를 사용하여 무슨 짓을했는지 기억한다 메인 페이지에서. If you don't remember, don't get angry. 만약 당신이 기억이 안나요, 화내지 말고. Go to your root folder where wordpress is installed and download & open the file wp-config.php with a simple text editor like Notepad/GEdit. 귀하의 루트 폴더로 이동 WordPress의 설치 및 다운로드 & 메모장 같은 간단한 텍스트 편집기로 파일을 WP - config.php 오픈 / gedit. You'll need to find this line: 당신이 라인을 찾아야합니다 :

 define('DB_NAME', 'ABCD'); 정의 ( 'db_name', 'ABCD'); 

Note that ABCD (without the single quotes around it) is the name of the database that wordpress is installed in.ABCD 주위 싱글 (따옴표 제외) 데이터베이스의 WordPress의 안으로 설치되어있는 이름입니다 참고

Back on the PHPMyAdmin page, click on the link of your database name. 귀하의 데이터베이스 이름의 링크를 위로 phpMyAdmin 페이지에 클릭하십시오. In my case it was _iwebdevel . 내 경우에는 그것을 _iwebdevel했다.

Select your database

Select your database 데이터베이스를 선택하십시오

Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. 이제 당신은,하지만 다른 phpMyAdmin 페이지가 나타납니다 귀하의 모든 테이블을 데이터베이스에 포함된 ABCD 발표있을거야 이번엔. We need to select the table users . 우리는 테이블에 사용자를 선택합니다. You won't see the exact name users of this table, but a name in this format xx_users , where xx_ is the prefix of your wordpress table names. 당신,하지만이 테이블의 정확한 이름을 사용자에게 표시되지 않습니다 xx_ 어디에 귀하의 WordPress의 테이블 이름의 접두사를이 형식으로 xx_users에서 이름입니다. Click on the link of your users table ( xx_users ). 사용자 테이블 (xx_users)의 링크를 클릭하십시오. In my case, as in most cases it's wp_users : 내 경우엔, wp_users의 대부분의 경우 다음과 같다 :

Select the users table

Select the users table 사용자가 테이블을 선택합니다

Now click on browse to see the rows contained in table xx_users . 행이 테이블에 포함된 xx_users찾아보기를 클릭하세요.

Click on browse

Click on browse 찾아보기를 클릭

Now look for the username you want to reset the password. 이제 사용자 이름을 비밀 번호를 재설정하려면 찾습니다. In my case I want to reset password for admin. Now click on the edit button. 내 경우엔, 제가 관리자 비밀 번호를 재설정하려면. '수정'버튼을 클릭하세요.

Edit user's details

Edit user's details 사용자의 세부 정보 편집

Now you'll need to generate an MD5 hash of the new password you would like to set. 이제 당신을 설정하려는 새 암호의 MD5 해시를 생성해야합니다. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. 원하는 비밀 번호를 입력합니다 http://seoanalytic.com/tools/md5_encryptor/ 및 이동. After you enter your new password, click on the Encrypt! button. 후 새로운 비밀 번호를 암호화! 버튼을 클릭하십시오.

Encrypt your password

Encrypt your password 귀하의 비밀 번호 암호화

After you've encrypted your password, select and copy the newly MD5 generated hash code. 후에는 귀하의 비밀 번호를 암호화했습니다를 선택하고 새로 생성된 MD5 해시 코드를 복사합니다.

Select and copy the MD5 hash

Select and copy the MD5 hash 선택 및 MD5 해시 복사

Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below: 이제 여러분 phpMyAdmin 페이지로 돌아가려면 및 클립 보드에 입력 필드 아래 이미지에 표시된대로에서 귀하의 MD5 해시를 붙여넣습니다 :

Paste MD5 hash in the specified input field

Paste MD5 hash in the specified input field 지정된 입력 필드에 붙여 넣습니다 MD5 해시

Finally click on Go button to save your new password. 이동 버튼을 클릭하여 새 비밀 번호를 저장하기 위해 마지막으로 클릭하십시오.

Save new password

Save new password 새 비밀 번호 저장

II Method: PHP 2 방법 : PHP는

In my opinion the second method is much faster and simpler. 내 생각에는 훨씬 더 빨리 두 번째 방법은 간단. In this method you'll just have to upload a PHP file to your host and access it with a browser. 이 방법에서는 방금 여러분의 호스트에 PHP 파일을 업로드하고 브라우저에 액세스해야합니다. But we'll talk about it a little bit later. 하지만 우리는 그것에 대해 조금 나중에 얘기하자.

So here's the piece of PHP code I've came up with to help you reset your wordpress account password. 그래서 나는 여기 당신이 WordPress의 계정 비밀 번호를 재설 정할 수 있도록 함께 나왔어요 PHP 코드의 조각입니다.

  $newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ = 'NEW_PASSWORD_GOES_HERE'Newpassword; / / 작은 따옴표 사이에 새 비밀 번호를 넣어 
	 $username='admin'; //put the login username you'd like to change the password to $ 사용자 이름 = '관리자'; / / 당신은 비밀 번호를 변경하고 싶은 사용자 이름을 넣어주세요 
	 @include_once('./wp-config.php'); //get some details from your wordpress installation @ include_once ( '. / WP - config.php'); / / 귀하의 WordPress의 설치에서 몇 가지 사항을 얻을 
	 global $table_prefix; 글로벌 $ table_prefix; 
	 $conxb=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); //establish connection to your database $ = (DB_HOST, DB_USER, DB_PASSWORD) mysql_connect conxb; / / 귀하의 데이터베이스에 대한 연결을 설정할 수 
	 mysql_select_db(DB_NAME,$conxb); mysql_select_db (db_name, $ conxb); 
	 $query='update `'.$table_prefix.'users` set `user_pass`=\''.mysql_real_escape_string(md5($newPassword)).'\' where `user_login`=\''.mysql_real_escape_string($username).'\' limit 1'; $ = 검색어 '`'업데이 트됩니다. $ table_prefix. '사용자가``= \ ''. mysql_real_escape_string (있는 md5 ($ Newpassword)).'\ '어디 user_login``=`user_pass 설정 \ ''. mysql_real_escape_string ($ 사용자 이름). '\'한도는 1 '; 
	 $mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ 쿼리, $ conxb); / / 새로운 비밀 번호를 설정 
	 echo $mQuery?'Successfully set new password. mQuery $ 파요? '새 암호를 성공적으로 설정되었습니다. New password: '.$newPassword:'There was an error. 새 암호 : '. $ Newpassword :'에는 오류가 발생했습니다. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message 오류 : '. mysql_error (); / / 만약 결과가 실패하면 mysql과 같은 오류 메시지가 나타납니다 
	 mysql_close($conxb); mysql_close ($ conxb); 

For your convenience you can download the file reset.php from here . 당신은 여기에서 파일을 다운로드하실 수있습니다 reset.php의 편의를 위해.

Now extract the zip archive you've just downloaded and edit the necessary parameters to suit your needs (explanation comments are present in the PHP code above). 지금 막 다운로드하고 사용자의 요구에 맞게 필요한 매개 변수를 편집 압축 아카이브를 추출 (설명을 보시려면 의견을 위의 PHP 코드)에 존재합니다. Then upload the file reset.php to your wordpress root installation folder. 그렇다면 귀하의 WordPress의 루트 설치 폴더에 파일을 업로드 reset.php. To make sure that this is the right directory, look for a file named wp-config.php , 확신이 올바른 디렉토리, 파일 이름 WP - config.php를 보이는 경우, 확인하려면 if it's there you're on the right way, else look for the directory where wp-config.php is present and upload the file reset.php there. 만약 거기에 당신이 올바른 방법에있어, 다른 디렉토리에 대한 WP - config.php 어디에 존재하는 파일을 업로드 reset.php 저기보세요.

Finally you'll want to go to http://yourDomainName.TLD/ reset.php . 마지막으로 당신에게 http://yourDomainName.TLD/ reset.php 가고 싶어합니다. You'll see the appropriate message depending on how the script worked. 어떻게 스크립트 근무에 따라 적절한 메시지가 나타납니다. If there is an error, post it here and I'll try to help you, else you did everything perfectly and you can now log in with your new password. 경우에는 오류가 발생, 여기를 게시하고 내가 너를 도우려고거야, 또 모든 일을 다 완벽하게 당신은 이제 귀하의 새 비밀 번호로 로그인할 수있습니다.

Translate this post 번역이 게시물에


Related posts: 관련 게시물 :

  1. Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? WordPress의 2.8.4 : 아직 준비가 5.3와 PHP가 설치되어 있어야합니다?
  2. Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script WordPress의 : Wordpress에 대한 최고의 SEO iTranslator, 완전 자동화된 플러그인을 스크립트에서 무료로 트래픽을 얻을
  3. PHP: How to get creation time of file with PHP on Linux machines PHP는 : 어떻게 리눅스 머신에서 PHP와 파일의 생성 시간을
  4. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP는 오류가 발생했습니다 : 회원 fetch_assoc 비 ()에서 - 개체 함수를 호출
  5. Coding:How to fetch user profile data with SSI.php from a SMF forum database 코딩 : 어떻게 SMF 포럼 SSI.php와 데이터베이스에서 사용자 프로필 데이터를 가져올 수

  • Katya 카탸
    :) :)
  • purie purie
    i have to try but why does still there error ? 내가하려고했지만 왜 아직 거기에 오류가? when i would to login.. 제가 ... 로그인을 것이라고 cann`t read the password .. `읽기 암호를 ... 마 cann
    could you tell why does my code still error. 당신이 말할 수있는 이유는 여전히 오류가 내 코드는 않습니다. thank you 감사합니다
blog comments powered by Disqus 블로그 덧글 Disqus에 의해 제공