phpMyAdminを使用してデータベースを管理する方法
phpMyAdminとは
phpMyAdminは、MySQLおよびMariaDBデータベースを管理するための広く使用されているオープンソースのデータベース管理ツールです。ウェブベースのユーザーインターフェイスを提供し、データベース管理をより直感的で便利にします。phpMyAdminには以下のような顕著な利点があります:
- 多機能:データベース、テーブル、フィールド、リレーション、インデックス、ユーザーと権限など、ほとんどのMySQLおよびMariaDBの機能をサポート。
- ユーザーフレンドリー:使いやすいグラフィカルインターフェイスを提供し、ユーザーが様々なデータベース操作を簡単に実行できるようサポート。
- 多言語対応:多くの言語をサポートしており、全世界のユーザーに対応。
- 拡張性が高い:プラグインやスクリプトの拡張をサポートし、ユーザーが必要に応じてカスタマイズできます。
開発者にとって、phpMyAdminは効率を向上させるだけでなく、データベース管理の複雑さを簡略化します。
phpMyAdminへのアクセス
ServBayにはphpMyAdminが組み込まれており、以下のURLからアクセスできます: https://servbay.host/phpmyadmin
phpMyAdminを使用してServBayに内蔵されたMariaDB(MySQL)データベースを管理する方法
サーバーにログイン
- ブラウザを開く:phpMyAdminのURLにアクセス。
- 接続情報を入力:ログイン画面でサーバー接続情報を入力:
- ユーザー名とパスワード:ServBayの「設定」-「データベース」から取得。
- サーバー:
default
または特定のバージョン
- ログイン:ログインボタンをクリックしてデータベース管理画面に入る。
データベースの作成
- データベース管理画面に入る:ログインに成功した後、左側のメニューの「データベース」をクリック。
- 新しいデータベースを作成:
- 「データベースの作成」フィールドにデータベース名を入力。
- 文字セットを選択(任意)。
- 「作成」ボタンをクリックしてデータベースを作成。
テーブルの作成
- データベースを選択:左側のメニューで作成したばかりのデータベースを選択。
- テーブルを作成:
- 「テーブルの作成」をクリック。
- テーブル名とフィールド情報(フィールド名、タイプ、長さ、デフォルト値など)を入力。
- 「保存」ボタンをクリックしてテーブルを作成。
データの追加
- テーブルを選択:左側のメニューで操作したいテーブルを選択。
- データを挿入:
- 「挿入」をクリック。
- データ値を入力。
- 「実行」ボタンをクリックしてデータを保存。
データのクエリ
- テーブルを選択:左側のメニューで操作したいテーブルを選択。
- データを閲覧:
- 「ブラウズ」をクリックしてテーブルのデータを表示。
- クエリ機能を使用してデータをフィルタリング。
データの更新
- テーブルを選択:左側のメニューで操作したいテーブルを選択。
- データの編集:
- 「ブラウズ」をクリックしてデータを表示。
- 編集したいデータ行を見つけて「編集」アイコンをクリック。
- データ値を変更。
- 「実行」ボタンをクリックして変更を保存。
データの削除
- テーブルを選択:左側のメニューで操作したいテーブルを選択。
- データを削除:
- 「ブラウズ」をクリックしてデータを表示。
- 削除したいデータ行を選択し、対応するチェックボックスにチェックを入れる。
- 「削除」ボタンをクリックして削除を確認。
テーブルの削除
- データベースを選択:左側のメニューで削除したいテーブルを含むデータベースを選択。
- テーブルを削除:
- データベース構造ビューで削除したいテーブルを選択。
- 「削除」ボタンをクリック。
- 削除操作を確認。
データベースの削除
- データベースを選択:左側のメニューで削除したいデータベースを選択。
- データベースを削除:
- 「操作」タブをクリック。
- ページの下部までスクロールして「データベースの削除」ボタンをクリック。
- 削除操作を確認。
以上の手順により、phpMyAdminを使用してServBayに内蔵されたMariaDB(MySQL)データベースを簡単に管理することができます。phpMyAdminのユーザーフレンドリーなインターフェイスと強力な機能が、データベース管理の効率を大幅に向上させます。データベースやテーブルの作成、データの挿入、クエリ、更新、削除において、phpMyAdminは便利な操作体験を提供します。