Ground Sunlight

Windowsで作る - PHPプログラミングの開発環境

ユーザ用ツール

サイト用ツール


mroonga:10.7:install

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン 両方とも次のリビジョン
mroonga:10.7:install [2020/11/03 13:33]
y2sunlight [サービスの開始]
mroonga:10.7:install [2020/11/06 11:11]
y2sunlight [Mroonga9.12 インストール]
行 1: 行 1:
-====== Mroonga10.インストール ====== +====== Mroonga9.12 インストール ====== 
-Version 10.7+Version 9.12 (MariaDB 10.4.12)
  
  --- //[[http://www.y2sunlight.com|y2sunlight]] 2020-11-02//  --- //[[http://www.y2sunlight.com|y2sunlight]] 2020-11-02//
行 9: 行 9:
 関連記事 関連記事
   * Mroonga10.7 インストール   * Mroonga10.7 インストール
-  * [[mroonga:10.7:phpmyadmin|Mroonga10.チュートリアル]] +  * [[mroonga:10.7:tutorial|Mroonga9.12 検索チュートリアル]] 
- +  * [[mroonga:10.7:config|Mroonga9.12 全文検索の設定]]
-=== パッケージの構成  === +
- +
-  * MariaDB 10.4.14 +
-  * Mroonga 10.7+
  
 === 前提条件 === === 前提条件 ===
行 38: 行 34:
 ===== パッケージの入手 ===== ===== パッケージの入手 =====
  
-本編で対象としている XAMPP7.3 に同封されている MariaDB 10.4.11 と同じマイナーバージョンを持つ MariaDB-with-Mroonga をダウンロードします。+本編で対象としている XAMPP7.3 に同封されている MariaDB 10.4.11 と同じマイナーバージョンを持つ MariaDB-with-Mroonga をダウンロードします。ここでは、MariaDB 10.4.12(with Mroonga9.12) の Windowsバイナリを以下のサイトから入手します。 
 + 
 +  * https://github.com/mroonga/mroonga/releases/tag/v9.12
  
-MroongaのWindowsバイナリはGitHub( https://github.com/mroonga/mroonga/releases )から入手できます。 
 [{{:mroonga:10.7:install01.png?nolink}}] [{{:mroonga:10.7:install01.png?nolink}}]
  
行 46: 行 43:
  
 <code> <code>
-mariadb-10.4.14-with-mroonga-10.07-winx64.zip+mariadb-10.4.12-with-mroonga-9.12-winx64.zip
 </code> </code>
  
行 65: 行 62:
 === Mroongaの設置 === === Mroongaの設置 ===
  
-  - 先にダウンロードしたZipファイル( mariadb-10.4.14-with-mroonga-10.07-winx64.zip ) を、例えば次のフォルダに解凍します。\\ ''D:\tmp\mariadb-10.4.14-with-mroonga-10.07-winx64'' +  - 先にダウンロードしたZipファイル( mariadb-10.4.12-with-mroonga-9.12-winx64.zip ) を、例えば次のフォルダに解凍します。\\ ''D:\tmp\mariadb-10.4.12-with-mroonga-9.12-winx64'' 
-  - 解凍したファイルをXAMPPのmysqlフォルダに設置します。\\ 【元】''D:\tmp\mariadb-10.4.14-with-mroonga-10.07-winx64\mariadb-10.4.14-winx64''\\ 【先】''D:\usr\xampp7.3.15\mysql''+  - 解凍したファイルをXAMPPのmysqlフォルダに設置します。\\ 【元】''D:\tmp\mariadb-10.4.12-with-mroonga-9.12-winx64\mariadb-10.4.12-winx64''\\ 【先】''D:\usr\xampp7.3.15\mysql''
  
 === my.iniの設定 === === my.iniの設定 ===
行 77: 行 74:
  
 >''注意'' >''注意''
-> Mroonga に限らず MariaDB でも現在は my.ini のサンプルファイル( my-small.iniやmy-medium.ini、my-large.iniなど ) はWindowsバイナリに同封されていません。「なぜ同封されなくなったのか?」の事情は、以下のページが参考になるかもしれません\\ https://jira.mariadb.org/browse/MDEV-9882+> Mroonga に限らず MariaDB でも現在は my.ini のサンプルファイル( my-small.iniやmy-medium.ini、my-large.iniなど ) はWindowsバイナリに同封されていません。「なぜ同封されなくなったのか?」の事情は、以下のページが参考になるかもしれません\\ https://jira.mariadb.org/browse/MDEV-9882
  
 \\ \\
行 93: 行 90:
 ===== 動作確認 ===== ===== 動作確認 =====
  
-TODO:+コマンドプロンプトを起動して、mysqlフォルダ下のbin( ''D:\usr\xampp7.3.15\mysql\bin'' )に移動して下さい。mysqlコマンドをrootユーザで起動します。 
 + 
 +<code bat> 
 +D:\> mysql -u root 
 +version Welcome to the MariaDB monitor.  Commands end with ; or \g. 
 +Your MariaDB connection id is 15 
 +Server version: 10.4.14-MariaDB Source distribution 
 + 
 +Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 
 + 
 +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
 + 
 +MariaDB [(none)]> 
 +</code> 
 + 
 +バージョンを確認します。 
 + 
 +<code bat> 
 +MariaDB [(none)]> select @@version; 
 ++-----------------+ 
 +| @@version       | 
 ++-----------------+ 
 +| 10.4.14-MariaDB | 
 ++-----------------+ 
 +</code> 
 + 
 +Mroonga がデータベースエンジンとして利用できるかを調べます。 
 + 
 +<code bat> 
 +MariaDB [(none)]> show engines; 
 ++--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ 
 +| Engine             | Support | Comment                                                                                         | Transactions | XA   | Savepoints | 
 ++--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ 
 +| CSV                | YES     | Stores tables as CSV files                                                                      | NO           | NO   | NO         | 
 +| MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                                           | NO           | NO   | NO         | 
 +| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                                       | NO           | NO   | NO         | 
 +| Aria               | YES     | Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables | NO           | NO   | NO         | 
 +| MyISAM             | YES     | Non-transactional engine with good performance and small data footprint                         | NO           | NO   | NO         | 
 +| SEQUENCE           | YES     | Generated tables filled with sequential values                                                  | YES          | NO   | YES        | 
 +| Mroonga            | YES     | CJK-ready fulltext search, column store                                                         | NO           | NO   | NO         | 
 +| PERFORMANCE_SCHEMA | YES     | Performance Schema                                                                              | NO           | NO   | NO         | 
 +| InnoDB             | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables                | YES          | YES  | YES        | 
 ++--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ 
 +</code> 
  
 \\ \\
  
-> TODO:+===== phpmyadminの利用 ===== 
 + 
 +XAMPPで設置した phpmyadmin も MariaDB with Mroonga で使えます。但し、phpmyadmin の初期設定を置き換えた新しいデータベースにしなければなりません。 
 + 
 +=== phpmyadminの起動 === 
 + 
 +ローカルホストのphpmyadminにアクセスします。
  
-(6) 以下のエラーがでる時: 
 <code> <code>
------------------------------ +http://localhost/phpmyadmin/
-mysqli::real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO) +
------------------------------+
 </code> </code>
  
-以下のようにコメントアウト+[{{:mroonga:10.7:phpmyadmin01.png?nolink}}] 
 +■ 起動後、以下のエラーが表示されます。
  
-D:\usr\xampp7.3.15\phpMyAdmin\config.inc.php 
 <code> <code>
-/* User for advanced features +(!) mysqli::real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost(using password: NO) 
-$cfg['Servers'][$i]['controluser'] = 'pma'; +(!) 設定ファイルに定義されている管理ユーザ(controluser)での接続に失敗しました。 
-$cfg['Servers'][$i]['controlpass'] = ''; +</code>
-*/+
  
-/* Advanced phpMyAdmin features +=== phpmyadmin用のデータベースの作成 ===
-$cfg['Servers'][$i]['pmadb''phpmyadmin'; +
-$cfg['Servers'][$i]['bookmarktable''pma__bookmark';+
  
-...+メニューの[インポート]を選択します。
  
-*/+[{{:mroonga:10.7:phpmyadmin02.png?nolink}}] 
 +■ 以下のファイルを選択し、画面下の[実行]ボタンを押します。 
 +<code> 
 +D:\usr\xampp7.3.15\phpMyAdmin\sql\create_tables.sql
 </code> </code>
 +
 +=== phpmyadmin用のユーザの作成 ===
 +
 +メニューの[SQL]を選択します。
 +
 +[{{:mroonga:10.7:phpmyadmin03.png?nolink}}]
 +■ 以下のSQL文を入力して、[実行]ボタンを押します。
 +<code sql>
 +GRANT
 +  SELECT, INSERT, DELETE, UPDATE, ALTER
 +  ON `phpmyadmin`.*
 +  TO 'pma'@localhost;
 +</code>
 +
 +以上で、MariaDB で Mroonga が使えるようになりました。
  
 \\ \\
 +
mroonga/10.7/install.txt · 最終更新: 2020/11/08 17:08 by y2sunlight