phpMyAdmin 是最流行的 MySQL Web 管理工具,透過瀏覽器即可操作資料庫。本文提供兩種配置方式(config.inc.php 與 config.default.php)完整步驟。
htdocs/phpmyadmin)。config.sample.inc.php,重命名為 config.inc.php。(若無此檔,從 libraries/config.default.php 複製並改名)。config.inc.php(建議用支援 UTF-8 的編輯器如 VS Code、Notepad++):
$cfg['blowfish_secret'] = 'your_random_string';(Cookie 認證必填,不可為空)。$cfg['Servers'][$i]['auth_type'] = 'cookie';(建議使用 cookie 認證)。https://localhost/phpmyadmin/,輸入 MySQL 帳密(通常 root/空密碼)登入。libraries/config.default.php(UTF-8 編碼,勿用記事本)。$cfg['PmaAbsoluteUri'] = 你的 phpMyAdmin 完整網址(如 https://domain.com/phpmyadmin/)。$cfg['Servers'][$i]['host'] = 'localhost' 或資料庫伺服器 IP。$cfg['Servers'][$i]['port'] = ''(預設 3306 留空即可)。$cfg['Servers'][$i]['user'] = 'root'(MySQL 使用者名稱)。$cfg['Servers'][$i]['password'] = 'your_password'(對應密碼)。$cfg['Servers'][$i]['auth_type'] = 'cookie'(推薦;Apache 可用 http/cookie,CGI 僅 cookie)。$cfg['blowfish_secret'] = 'your_random_string'(Cookie 模式必填)。$cfg['Servers'][$i]['only_db'] = ''(限定單一資料庫名稱,留空則管理所有)。$cfg['DefaultLang'] = 'zh'(繁體中文介面用 'zh-tw')。