Skip to content

クイックスタート

5分でMygramDBを起動しましょう。

前提条件

  • GTIDが有効なMySQL 8.0以上
  • RHEL/AlmaLinux/Rocky Linux 9、またはDocker

インストール

RPM(RHEL/AlmaLinux/Rocky Linux 9)

GitHub Releasesからダウンロードしてインストール:

bash
sudo rpm -i mygramdb-*.el9.x86_64.rpm

Docker

bash
docker pull ghcr.io/libraz/mygramdb:latest

最小構成

/etc/mygramdb/config.yamlを作成:

yaml
mysql:
  host: "localhost"
  port: 3306
  user: "mygramdb"
  password: "your_password"
  database: "myapp"

tables:
  - name: "articles"
    text_source:
      column: "content"
    primary_key: "id"

api:
  tcp:
    port: 11016
  http:
    enable: true
    port: 8080

# localhostからの接続を許可
network:
  allow_cidrs:
    - "127.0.0.1/32"

IMPORTANT

allow_cidrsの設定は必須です。設定がない場合、すべての接続が拒否されます。接続元のIPアドレスをリストに追加してください。

サービスを開始

bash
sudo systemctl enable --now mygramdb

動作確認

bash
# CLIで接続
mygram-cli -h localhost -p 11016

接続後、検索クエリを実行:

mygram> SEARCH articles hello world
OK RESULTS 3 101 205 387

次のステップ

詳細ドキュメント

Released under the MIT License.