差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:technical_annexes:19_mysql_8 [2024/08/25 06:39] – [CentOS 7] junichi | ja:documentation:pandorafms:technical_annexes:19_mysql_8 [2025/02/20 06:50] (現在) – [Rocky Linux 8/AlmaLinux 8/RHEL 8] junichi | ||
---|---|---|---|
行 41: | 行 41: | ||
* データバックアップ手順を実行します。詳細は、[[: | * データバックアップ手順を実行します。詳細は、[[: | ||
- | ===== CentOS 7 ===== | + | <wrap #ks2 /> |
- | <WRAP center round info 90%> | + | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== |
- | + | ||
- | CentOS 7 will soon reach its end-of-life (**EOL**). | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | <WRAP center round info 90%> | + | |
- | + | ||
- | CentOS 7 はサポート終了 (**EOL**) となっています。// | + | |
- | + | ||
- | </ | + | |
* Stop the PFMS server and the PFMS Software Agent: | * Stop the PFMS server and the PFMS Software Agent: | ||
- | * Pandora FMS サーバと Pandora FMS ソフトウエアエージェントを停止します。 | + | * Pandora FMS サーバおよび |
<code bash> | <code bash> | ||
- | / | + | systemctl |
- | / | + | systemctl |
</ | </ | ||
行 67: | 行 57: | ||
* Stop the Apache web server: | * Stop the Apache web server: | ||
- | * Apache | + | * Apache |
<code bash> | <code bash> | ||
行 85: | 行 75: | ||
* Make a special database backup that is compatible with MySQL 8: | * Make a special database backup that is compatible with MySQL 8: | ||
- | * MySQL 8 に互換性がある特別なデータベースバックアップを作成します。 | + | * MySQL 8 に互換性のある特別なデータベースバックアップを作成します。 |
<code bash> | <code bash> | ||
行 97: | 行 87: | ||
* Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): | * Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): | ||
- | * MySQL 5.7 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です) | + | * MySQL 5.7 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です。) |
<code bash> | <code bash> | ||
行 127: | 行 117: | ||
<code bash> | <code bash> | ||
- | yum install https:// | + | dnf install https:// |
</ | </ | ||
行 145: | 行 135: | ||
<code bash> | <code bash> | ||
- | yum install percona-server-server | + | dnf install percona-server-server |
</ | </ | ||
行 160: | 行 150: | ||
* Modify the '' | * Modify the '' | ||
- | * '' | + | * '' |
<code bash> | <code bash> | ||
行 172: | 行 162: | ||
* If **you do not have an HA environment**, | * If **you do not have an HA environment**, | ||
- | * **HA 環境が無い場合**は、'' | + | * **HA 環境が無い場合**は、'' |
< | < | ||
行 181: | 行 171: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | See also " | + | See also " |
</ | </ | ||
行 220: | 行 210: | ||
You will get an answer similar to the following: | You will get an answer similar to the following: | ||
- | 次のような出力を確認できます。 | + | 次のような出力が見られます。 |
< | < | ||
行 254: | 行 244: | ||
</ | </ | ||
- | * The necessary permissions (grants) must be added again; //if you are not logged in// to '' | + | * The necessary permissions (//grants//) must be added again; //if you are not logged in// to '' |
- | * 必要なアクセス許可を再度追加する必要があります。 '' | + | * 必要な権限 (// |
<code bash> | <code bash> | ||
- | mysql -u root -p < password > | + | mysql -uroot -p < password > |
</ | </ | ||
- | * **Once logged in as root execute the following commands:** | + | * **Once logged in as root execute the following commands**: |
- | * Deactivate the password validation plugin (optional). | + | * Deactivate the password validation plugin (**optional**). |
- | * **root としてログインしてら次のコマンドを実行します。** | + | * **root としてログインしたら、次のコマンドを実行します**: |
- | * パスワード検証プラグインを無効にします(オプション)。 | + | * パスワード検証プラグインを無効にします (**オプション**)。 |
- | < | + | < |
UNINSTALL COMPONENT ' | UNINSTALL COMPONENT ' | ||
</ | </ | ||
- | * Create the login user if it does not exist: | + | * Create the login user **if it does not exist**: |
- | * ログインユーザが存在しない場合は作成します。 | + | |
<code sql> | <code sql> | ||
行 285: | 行 275: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | If you want to restrict the IP address of connection to the database, you must change the '' | + | If you want to restrict the IP address of connection to the database, you must change the '' |
</ | </ | ||
行 291: | 行 281: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | データベースへの接続 IP アドレスを制限したい場合は、'' | + | データベースへの接続の IP アドレスを制限する場合は、'' |
</ | </ | ||
行 297: | 行 287: | ||
* Assign the native password for '' | * Assign the native password for '' | ||
- | * '' | + | * '' |
<code sql> | <code sql> | ||
行 306: | 行 296: | ||
* Grant grants on Pandora FMS database ('' | * Grant grants on Pandora FMS database ('' | ||
- | * Pandora FMS データベース('' | + | * Pandora FMS データベース ('' |
- | <codes sql> | + | <code sql> |
GRANT ALL PRIVILEGES ON pandora.* TO "< | GRANT ALL PRIVILEGES ON pandora.* TO "< | ||
</ | </ | ||
- | * Save the changes and exit: | + | * Save changes and exit: |
- | * 変更を保存して抜けます。 | + | * 変更を保存して終了します。 |
<code sql> | <code sql> | ||
行 322: | 行 312: | ||
</ | </ | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | |||
+ | To change the authentication type in MySQL 8 refer to the topic «[[: | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | |||
+ | MySQL 8 で認証タイプを変更するには、トピック「[[: | ||
+ | |||
+ | </ | ||
Once you have finished working with the database, perform the following steps: | Once you have finished working with the database, perform the following steps: | ||
- | データベースの対応が完了したら、次のステップを実行します。 | + | データベースでの作業が完了したら、次の手順を実行します。 |
* Start the PFMS server and the PFMS Software Agent: | * Start the PFMS server and the PFMS Software Agent: | ||
行 332: | 行 334: | ||
<code bash> | <code bash> | ||
- | / | + | systemctl |
- | / | + | systemctl |
</ | </ | ||
行 339: | 行 341: | ||
* Start the Apache web server: | * Start the Apache web server: | ||
- | * Apache | + | * Apache |
<code bash> | <code bash> | ||
行 346: | 行 348: | ||
</ | </ | ||
- | Either: | + | [[ja:documentation: |
- | または、 | + | ===== (OBSOLETE) CentOS 7 ===== |
- | <code bash> | + | <WRAP center round info 90%> |
- | / | + | |
- | </code> | + | CentOS 7 will soon reach its end-of-life (**EOL**). //This documentation is retained for historical purposes.// |
- | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | + | </WRAP> |
+ | |||
+ | <WRAP center round info 90%> | ||
+ | |||
+ | CentOS 7 はサポート終了 (**EOL**) となっています。// | ||
+ | |||
+ | </ | ||
* Stop the PFMS server and the PFMS Software Agent: | * Stop the PFMS server and the PFMS Software Agent: | ||
- | * Pandora FMS サーバおよび | + | * Pandora FMS サーバと Pandora FMS ソフトウエアエージェントを停止します。 |
- | < | + | |
+ | < | ||
/ | / | ||
/ | / | ||
行 368: | 行 376: | ||
* Stop the Apache web server: | * Stop the Apache web server: | ||
- | * Apache | + | * Apache |
- | < | + | |
+ | < | ||
systemctl stop httpd.service | systemctl stop httpd.service | ||
行 378: | 行 387: | ||
または、 | または、 | ||
- | < | + | < |
/ | / | ||
行 385: | 行 394: | ||
* Make a special database backup that is compatible with MySQL 8: | * Make a special database backup that is compatible with MySQL 8: | ||
- | * MySQL 8 に互換性のある特別なデータベースバックアップを作成します。 | + | * MySQL 8 に互換性がある特別なデータベースバックアップを作成します。 |
- | < | + | |
+ | < | ||
mysqldump -u root -p pandora \ | mysqldump -u root -p pandora \ | ||
--skip-add-drop-table \ | --skip-add-drop-table \ | ||
行 396: | 行 406: | ||
* Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): | * Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): | ||
- | * MySQL 5.7 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です。) | + | * MySQL 5.7 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です) |
- | < | + | |
- | mysqldump -u root -p pandora > backup_pandora_5.7.sql | + | < |
+ | mysqldump -u root -p pandora> backup_pandora_5.7.sql | ||
</ | </ | ||
行 405: | 行 416: | ||
* MySQL 設定ファイル('' | * MySQL 設定ファイル('' | ||
- | < | + | |
+ | < | ||
cp /etc/my.cnf / | cp /etc/my.cnf / | ||
行 413: | 行 425: | ||
* Percona 5 リポジトリを削除します。 | * Percona 5 リポジトリを削除します。 | ||
- | < | + | |
+ | < | ||
rpm -qa | grep Percona-Server | xargs rpm -e --nodeps | rpm -qa | grep Percona-Server | xargs rpm -e --nodeps | ||
行 421: | 行 434: | ||
* Percona 8 リポジトリをインストールします。 | * Percona 8 リポジトリをインストールします。 | ||
- | < | ||
- | dnf install https:// | + | <code bash> |
+ | yum install https:// | ||
</ | </ | ||
行 430: | 行 443: | ||
* 前述のリポジトリを有効化します。 | * 前述のリポジトリを有効化します。 | ||
- | < | + | |
+ | < | ||
percona-release setup ps80 | percona-release setup ps80 | ||
行 438: | 行 452: | ||
* Percona 8 をインストールします。 | * Percona 8 をインストールします。 | ||
- | < | + | |
- | dnf install percona-server-server | + | < |
+ | yum install percona-server-server | ||
</ | </ | ||
行 446: | 行 461: | ||
* '' | * '' | ||
- | < | + | |
+ | < | ||
mv / | mv / | ||
行 453: | 行 469: | ||
* Modify the '' | * Modify the '' | ||
- | * '' | + | * '' |
- | < | + | |
+ | < | ||
sed -i -e " | sed -i -e " | ||
sed -i -e " | sed -i -e " | ||
行 464: | 行 481: | ||
* If **you do not have an HA environment**, | * If **you do not have an HA environment**, | ||
- | * **HA 環境が無い場合**は、'' | + | * **HA 環境が無い場合**は、'' |
< | < | ||
行 471: | 行 488: | ||
</ | </ | ||
- | <WRAP center round tip 60%> | + | <WRAP center round tip 90%> |
- | See also "[[:en: | + | See also " |
</ | </ | ||
- | <WRAP center round tip 60%> | + | <WRAP center round tip 90%> |
- | '' | + | '' |
</ | </ | ||
行 486: | 行 503: | ||
* MySQL サービスを起動します。 | * MySQL サービスを起動します。 | ||
- | < | + | |
+ | < | ||
systemctl start mysql | systemctl start mysql | ||
行 495: | 行 513: | ||
または、 | または、 | ||
- | < | + | < |
service mysqld start | service mysqld start | ||
行 503: | 行 521: | ||
* インストールされたバージョンを確認します。 | * インストールされたバージョンを確認します。 | ||
- | < | + | |
+ | < | ||
mysql --version | mysql --version | ||
行 510: | 行 529: | ||
You will get an answer similar to the following: | You will get an answer similar to the following: | ||
- | 次のような出力が見られます。 | + | 次のような出力を確認できます。 |
< | < | ||
行 530: | 行 549: | ||
* 特別な MySQL 8 互換バックアップをインポートします。 | * 特別な MySQL 8 互換バックアップをインポートします。 | ||
- | < | + | < |
mysql -u root -p pandora | mysql -u root -p pandora | ||
</ | </ | ||
- | < | + | < |
drop database pandora; | drop database pandora; | ||
create database pandora; | create database pandora; | ||
行 543: | 行 562: | ||
</ | </ | ||
+ | |||
+ | * The necessary permissions (grants) must be added again; //if you are not logged in// to '' | ||
+ | |||
+ | * 必要なアクセス許可を再度追加する必要があります。 '' | ||
+ | |||
+ | <code bash> | ||
+ | mysql -u root -p < password > | ||
+ | |||
+ | </ | ||
+ | |||
+ | * **Once logged in as root execute the following commands:** | ||
+ | * Deactivate the password validation plugin (optional). | ||
+ | |||
+ | * **root としてログインしてら次のコマンドを実行します。** | ||
+ | * パスワード検証プラグインを無効にします(オプション)。 | ||
+ | |||
+ | < | ||
+ | UNINSTALL COMPONENT ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Create the login user if it does not exist: | ||
+ | |||
+ | * ログインユーザが存在しない場合は作成します。 | ||
+ | |||
+ | <code sql> | ||
+ | CREATE USER "< | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | |||
+ | If you want to restrict the IP address of connection to the database, you must change the '' | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | |||
+ | データベースへの接続 IP アドレスを制限したい場合は、'' | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Assign the native password for '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | <code sql> | ||
+ | ALTER USER "< | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Grant grants on Pandora FMS database ('' | ||
+ | |||
+ | * Pandora FMS データベース('' | ||
+ | |||
+ | <codes sql> | ||
+ | GRANT ALL PRIVILEGES ON pandora.* TO "< | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Save the changes and exit: | ||
+ | |||
+ | * 変更を保存して抜けます。 | ||
+ | |||
+ | <code sql> | ||
+ | flush privileges; | ||
+ | exit | ||
+ | |||
+ | </ | ||
+ | |||
+ | Once you have finished working with the database, perform the following steps: | ||
+ | |||
+ | データベースの対応が完了したら、次のステップを実行します。 | ||
* Start the PFMS server and the PFMS Software Agent: | * Start the PFMS server and the PFMS Software Agent: | ||
* Pandora FMS サーバおよび Pandora FMS ソフトウエアエージェントを起動します。 | * Pandora FMS サーバおよび Pandora FMS ソフトウエアエージェントを起動します。 | ||
- | < | + | |
+ | < | ||
/ | / | ||
/ | / | ||
行 555: | 行 648: | ||
* Start the Apache web server: | * Start the Apache web server: | ||
- | * Apache | + | * Apache |
- | < | + | |
+ | < | ||
systemctl start httpd.service | systemctl start httpd.service | ||
行 565: | 行 659: | ||
または、 | または、 | ||
- | < | + | < |
/ | / | ||
</ | </ | ||
- | |||
- | [[ja: | ||
- | |||