Learning site for website creation

XAMPP:phpMyAdmin設定

公開日:2022年01月27日

設定ファイルの場所

C:\ [XAMPPインストールディレクトリ] \phpMyAdmin\config.inc.php

設定ファイル変更箇所

「config.inc.php」の20行目、21行目の設定を変更

変更前

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

変更後

$cfg['Servers'][$i]['user'] = 'DBユーザ名';
$cfg['Servers'][$i]['password'] = 'DBパスワード';

ログオン画面を使用する

「cookie」を設定することでphpMyAdmin画面アクセス時、ログオン画面を表示できます。

「config」の場合はphpMyAdmin画面アクセス時、ログオン済み画面が表示されます。

「config.inc.php」の19行目の設定を変更

変更前

$cfg['Servers'][$i]['auth_type'] = 'config';

変更後

$cfg['Servers'][$i]['auth_type'] = 'cookie';

「config.inc.php」を保存します。

設定ファイルの詳細は以下URLから参照できます。

https://docs.phpmyadmin.net/ja/latest/config.html

phpMyAdminを表示

XAMPPコントロールパネルでMySQLを「Start」します。

MySQLが起動した後に「Admin」をクリックします。
※「http://localhost/phpmyadmin」にアクセスして表示でも可

phpMyAdmin画面が表示されれば設定完了です。