Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 電腦軟體介紹

phpMyAdmin 設定安裝教學:config.inc.php 關鍵參數詳解

編輯:電腦軟體介紹

phpMyAdmin 是 MySQL 最常用的 Web 管理介面,本地測試環境配置好可同步套用至遠端虛擬主機。

安裝配置步驟

  1. 下載 phpMyAdmin 壓縮包,解壓至 Web 根目錄(如 htdocs/phpmyadmin)。
  2. 進入目錄,尋找 config.sample.inc.php,重新命名為 config.inc.php。
    (若無 sample 檔,從 libraries/config.default.php 複製並改名)。
  3. 用文字編輯器開啟 config.inc.php,修改兩處關鍵值:
    $cfg['blowfish_secret'] = 'your_random_string'; // 必填,任意字串作為 Cookie 加密鹽
    $cfg['Servers'][$i]['auth_type'] = 'cookie'; // 保持 cookie 認證模式
  4. 儲存,瀏覽器訪問 https://localhost/phpmyadmin/,輸入 MySQL 帳號密碼即可登入管理介面。

blowfish_secret 未設定時 cookie 認證會報錯,務必填入隨機字串(建議 32 字元以上)。

Copyright © Windows教程網 All Rights Reserved