官網 phpmyadmin.net 國內訪問不穩定,GitHub 釋出頁提供完整、簽名驗證的壓縮包,更適合自動化部署。
phpMyAdmin-x.x.x-all-languages.zip(含所有語言包)或 english 精簡版。/var/www/html/phpmyadmin),確保 Web 服務器有讀取權限。config.sample.inc.php 為 config.inc.php,核心配置項:
$cfg['blowfish_secret'] = 'your_32chars_random_string'; // Cookie 加密密鑰,必填
$cfg['Servers'][$i]['host'] = 'localhost'; // 或 127.0.0.1 / Unix Socket
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // 推薦 Cookie 認證,避免明文密碼
$cfg['Servers'][$i]['compress'] = true; // 啟用壓縮傳輸
SELECT, INSERT, UPDATE, DELETE 等),禁止 ROOT 遠程登錄。allow/deny 或 Apache Require ip)。https://your-domain/phpmyadmin,輸入資料庫帳號密碼登錄。$cfg['Servers'] 數組中添加多組配置,下拉選單切換。$cfg['Servers'][$i]['hide_db'] = '^(mysql|information_schema|performance_schema)$';php.ini 的 upload_max_filesize, post_max_size, memory_limit 及 $cfg['ExecTimeLimit']。blowfish_secret 未設定 → 底部報警「配置文件需要一個 blowfish_secret」config.inc.php 擁有者/權限(通常 www-data:www-data 644)。session.save_path 可寫,PHP 擴展 session 已載入。