phpMyAdmin 提供三種認證方式,生產環境強烈建議採用 cookie 模式:
$cfg['blowfish_secret'] 加密 Cookie,支援所有現代瀏覽器,安全且通用。$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['blowfish_secret'] = 'your_random_string_here'; // 必填
預設受限於 PHP upload_max_filesize。解決方案:在 phpMyAdmin 根目錄建立 ports 目錄(需寫入權限),配置:
$cfg['UploadDir'] = 'ports';
$cfg['SaveDir'] = 'ports';
操作完成後務必清空目錄,防止備份檔洩露。
修改 css/phpmyadmin.css.php 固定字體大小,避免動態計算開銷:
html { font-size: 11px; }
11px 為多數螢幕最佳閱讀體驗。