phpMyAdmin を使って MariaDB に接続できないのはなぜですか?


最終更新日: 2023-07-28

該当製品

  • MariaDB 10
  • QTS 5.0.x上のphpMyAdmin 4.9.11.0(またはそれ以前)
  • QTS 5.1.x上のphpMyAdmin 5.2.1.0(またはそれ以前)

根本原因

MariaDB 10はビルトインアプリケーションではありません。そのため、MariaDB 10にアクセスするにはWindowsのsmb経由でphpMyAdminの設定ファイル(config.inc.php)を編集する必要があります。


対処

  1. 管理者としてQTSにログオンします。
  2. App Centerを開きます。
  3. phpMyAdminMariaDB 10をインストールします。
  4. MariaDB 10を設定します。
    1. MariaDB 10を開きます。
    2. [Account and Database (アカウントとデータベース)]に移動します。
    3. [Root password (ルートパスワード)]の隣の[Reset (リセット)] をクリックします。
      ルートパスワードのリセット後、アプリケーションは再起動します。ルートパスワードをリセットしても、データは失われません。
  5. phpMyAdminの設定を行います。
    1. SMB接続でWeb共有フォルダーに管理者として接続します。
    2. Web\phpMyAdmin\ に移動します。
    3. config.inc.phpをテキストエディタで開きます。
    4. [Servers configuration (サーバー設定)]セクションを探します。
      /** * Servers configuration */ $i = 0; /** * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;
    5. ファイルから[Servers configuration (サーバー設定)]スクリプトを削除します。
    6. 以下のスクリプトを入力してください。
      /** * Servers configuration */ $i = 0; /** * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['verbose'] = 'MariaDB 5'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false; /** * Second server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['verbose'] = 'MariaDB 10'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['socket'] = '/var/run/mariadb10.sock'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;
    7. ファイルを保存します。
    8. phpMyAdminアプリを閉じます。
    9. phpMyAdminアプリを再度開きます。
    10. [MariaDB 5]または[MariaDB 10]を選択します。
    11. ユーザー名とパスワードを入力します。
    12. [Go (移動)]をクリックします。

これでphpMyAdminでMariaDBに接続できるようになりました。

この記事は役に立ちましたか?

58% の人が、これは役に立つと思っています。
ご意見をいただき、ありがとうございます。

この記事の改善箇所をお知らせください。

その他のフィードバックがある場合は、以下に入力してください。

仕様を選択

      もっと見る 閉じる

      当ページを他の国/地域で見る:

      気軽にお問い合わせ! show inquiry button
      open menu
      back to top