在phpMyAdmin使用使用者口令登陸_PHP教程

來源:互聯網
上載者:User
使用過phpMyAdmin的人知道,在phpMyAdmin中,使用檔案config.inc.php儲存使用者名稱和密碼,當需要更換使用者或使用者口令更改時,必須修改config.inc.php檔案,然後再上傳,特別的不方便。更有時,為了修改MYSQL庫或表而使用root帳號,如果這時其它網站的自動搜擎系統搜尋到index.php並繼續執行其中的每一步的話,是相當危險的。為此需要使用者登陸機制,在每次使用時,輸入使用者名稱和口令,這樣會安全得多。
以下是我在管理過程中,根據實際需要,對phpMyAdmin做的一些更改,為了盡量不影響原來phpMyAdmin的結構,我在phpMyAdmin的基礎上增加了一個檔案index0.php,僅僅修改了一個檔案config.inc.php,對phpMyAdmin沒有一點影響,既可以使用原來的phpMyAdmin,也可以使用新的使用者口令登陸機制。
以下為兩個檔案清單,將這兩個檔案拷貝到phpMyAdmin目錄,執行index0.php即可,該程式在Apache + PHP + MYSQL 和 IIS5 + PHP + MYSQl 和 PWS + PHP + MYSQL下正常執行。
phpMyAdmin 下載:
A set of PHP3-scripts to adminstrate MySQL over the WWW.
Version 2.1.0 - 08/06/2000
http://www.phpwizard.net/projects/phpMyAdmin/

index0.php檔案:

MySQL 維護
PHP運行不正常,請檢查

config.inc.php 檔案

/* $Id: config.inc.php,v 1.28 2000/07/13 13:52:48 tobias Exp $ */

//編碼,防止在地址欄上顯示
function b2h($string) {
return(bin2hex(strrev($string)));
}

//反編碼,防止在地址欄上顯示
function h2b($string)

http://www.bkjia.com/PHPjc/532463.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532463.htmlTechArticle使用過phpMyAdmin的人知道,在phpMyAdmin中,使用檔案config.inc.php儲存使用者名稱和密碼,當需要更換使用者或使用者口令更改時,必須修改config.inc.php文...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.