差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:technical_annexes:19_mysql_8 [2024/12/28 07:37] – [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: | ||
* データバックアップ手順を実行します。詳細は、[[: | * データバックアップ手順を実行します。詳細は、[[: | ||
+ | <wrap #ks2 /> | ||
===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ||
行 49: | 行 50: | ||
<code bash> | <code bash> | ||
- | / | + | systemctl |
- | / | + | systemctl |
</ | </ | ||
行 242: | 行 243: | ||
</ | </ | ||
+ | |||
+ | * The necessary permissions (// | ||
+ | |||
+ | * 必要な権限 (// | ||
+ | |||
+ | <code bash> | ||
+ | mysql -uroot -p < password > | ||
+ | |||
+ | </ | ||
+ | |||
+ | * **Once logged in as root execute the following commands**: | ||
+ | * Deactivate the password validation plugin (**optional**). | ||
+ | |||
+ | * **root としてログインしたら、次のコマンドを実行します**: | ||
+ | * パスワード検証プラグインを無効にします (**オプション**)。 | ||
+ | |||
+ | <code sql> | ||
+ | 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 データベース ('' | ||
+ | |||
+ | <code sql> | ||
+ | GRANT ALL PRIVILEGES ON pandora.* TO "< | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Save changes and exit: | ||
+ | |||
+ | * 変更を保存して終了します。 | ||
+ | |||
+ | <code sql> | ||
+ | flush privileges; | ||
+ | exit | ||
+ | |||
+ | </ | ||
+ | |||
+ | <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: | ||
+ | |||
+ | データベースでの作業が完了したら、次の手順を実行します。 | ||
* Start the PFMS server and the PFMS Software Agent: | * Start the PFMS server and the PFMS Software Agent: | ||
行 248: | 行 334: | ||
<code bash> | <code bash> | ||
- | / | + | systemctl |
- | / | + | systemctl |
</ | </ | ||
行 259: | 行 345: | ||
<code bash> | <code bash> | ||
systemctl start httpd.service | systemctl start httpd.service | ||
+ | |||
+ | </ | ||
+ | |||
+ | [[ja: | ||
+ | |||
+ | ===== (OBSOLETE) CentOS 7 ===== | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | |||
+ | CentOS 7 will soon reach its end-of-life (**EOL**). //This documentation is retained for historical purposes.// | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | |||
+ | CentOS 7 はサポート終了 (**EOL**) となっています。// | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Stop the PFMS server and the PFMS Software Agent: | ||
+ | |||
+ | * Pandora FMS サーバと Pandora FMS ソフトウエアエージェントを停止します。 | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Stop the Apache web server: | ||
+ | |||
+ | * Apache Web サーバを停止します。 | ||
+ | |||
+ | <code bash> | ||
+ | systemctl stop httpd.service | ||
</ | </ | ||
行 267: | 行 388: | ||
<code bash> | <code bash> | ||
- | / | + | / |
</ | </ | ||
- | [[ja:documentation: | + | * Make a special database backup that is compatible with MySQL 8: |
+ | * MySQL 8 に互換性がある特別なデータベースバックアップを作成します。 | ||
+ | |||
+ | <code bash> | ||
+ | mysqldump -u root -p pandora \ | ||
+ | --skip-add-drop-table \ | ||
+ | --complete-insert \ | ||
+ | --no-create-info> | ||
+ | |||
+ | </ | ||
+ | |||
+ | * 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 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です) | ||
+ | |||
+ | <code bash> | ||
+ | mysqldump -u root -p pandora> backup_pandora_5.7.sql | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Back up the MySQL configuration file ('' | ||
+ | |||
+ | * MySQL 設定ファイル('' | ||
+ | |||
+ | <code bash> | ||
+ | cp /etc/my.cnf / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Delete the Percona 5 repositories: | ||
+ | |||
+ | * Percona 5 リポジトリを削除します。 | ||
+ | |||
+ | <code bash> | ||
+ | rpm -qa | grep Percona-Server | xargs rpm -e --nodeps | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Install the Percona 8 repositories: | ||
+ | |||
+ | * Percona 8 リポジトリをインストールします。 | ||
+ | |||
+ | <code bash> | ||
+ | yum install https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Enable the repositories from the previous step: | ||
+ | |||
+ | * 前述のリポジトリを有効化します。 | ||
+ | |||
+ | <code bash> | ||
+ | percona-release setup ps80 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Install Percona 8 | ||
+ | |||
+ | * Percona 8 をインストールします。 | ||
+ | |||
+ | <code bash> | ||
+ | yum install percona-server-server | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Restore the file '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | <code bash> | ||
+ | mv / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Modify the '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | <code bash> | ||
+ | sed -i -e " | ||
+ | sed -i -e " | ||
+ | sed -i -e " | ||
+ | sed -i -e " | ||
+ | |||
+ | </ | ||
+ | |||
+ | * If **you do not have an HA environment**, | ||
+ | |||
+ | * **HA 環境が無い場合**は、'' | ||
+ | |||
+ | < | ||
+ | skip-log-bin | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | |||
+ | See also " | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | |||
+ | '' | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Start the MySQL service: | ||
+ | |||
+ | * MySQL サービスを起動します。 | ||
+ | |||
+ | <code bash> | ||
+ | systemctl start mysql | ||
+ | |||
+ | </ | ||
+ | |||
+ | or: | ||
+ | |||
+ | または、 | ||
+ | |||
+ | <code bash> | ||
+ | service mysqld start | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Verify the version installed with: | ||
+ | |||
+ | * インストールされたバージョンを確認します。 | ||
+ | |||
+ | <code bash> | ||
+ | mysql --version | ||
+ | |||
+ | </ | ||
+ | |||
+ | You will get an answer similar to the following: | ||
+ | |||
+ | 次のような出力を確認できます。 | ||
+ | |||
+ | < | ||
+ | mysql Ver 8.0.28-19 for Linux on x86_64 (Percona Server (GPL), Release 19, Revision 31e88966cd3) | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Now use MySQL' | ||
+ | * Delete the '' | ||
+ | * Create a new '' | ||
+ | * Open the '' | ||
+ | * Import the data that special MySQL 8 compatible backup. | ||
+ | |||
+ | * MySQL のコマンドラインで、 | ||
+ | * '' | ||
+ | * 新たな '' | ||
+ | * '' | ||
+ | * データをインポートします。 | ||
+ | * 特別な MySQL 8 互換バックアップをインポートします。 | ||
+ | |||
+ | <code bash> | ||
+ | mysql -u root -p pandora | ||
+ | |||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | drop database pandora; | ||
+ | create database pandora; | ||
+ | use pandora; | ||
+ | source / | ||
+ | source backup_pandora.sql; | ||
+ | |||
+ | </ | ||
+ | |||
+ | * 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: | ||
+ | |||
+ | * Pandora FMS サーバおよび Pandora FMS ソフトウエアエージェントを起動します。 | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Start the Apache web server: | ||
+ | |||
+ | * Apache Web サーバを起動します。 | ||
+ | |||
+ | <code bash> | ||
+ | systemctl start httpd.service | ||
+ | |||
+ | </ | ||
+ | |||
+ | Either: | ||
+ | |||
+ | または、 | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | |||
+ | </ | ||