ja:documentation:07_technical_annexes:19_mysql_8

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
ja:documentation:07_technical_annexes:19_mysql_8 [2022/12/02 08:27] – [Rocky Linux 8/AlmaLinux 8/RHEL 8] junichija:documentation:07_technical_annexes:19_mysql_8 [2023/01/31 05:48] – [Rocky Linux 8/AlmaLinux 8/RHEL 8] junichi
行 148: 行 148:
  
 </code> </code>
 +
 +  * If **you do not have an HA environment**, disable the binary logs with the following command in the ''[mysqld]''  section:
 +
 +  * **HA 環境が無い場合**は、''[[mysqld]]'' セクションの次のコマンドでバイナリログを無効化します。
 +
 +<code>
 +skip-log-bin
 +
 +</code>
 +
 +<WRAP center round tip 60%>
 +
 +See also "[[:en:documentation:05_big_environments:08_optimization#check_mycnf_settings|Optimization and troubleshooting]]" for checking the ''my.cnf''  file.
 +
 +</WRAP>
 +
 +<WRAP center round tip 60%>
 +
 +''my.cnf'' ファイルのチェックには、"[[:ja:documentation:05_big_environments:08_optimization#mycnf_設定の確認|最適化と問題解決]]" も参照してください。
 +
 +</WRAP>
  
   * Start the MySQL service:   * Start the MySQL service:
行 197: 行 218:
  
 <code> <code>
-mysql -u root -p pandora +mysql -u root -p pandora
-> drop database pandora; +
-> create database pandora; +
-> use pandora; +
-> source /var/www/html/pandora_console/pandoradb.sql; +
-> source backup_pandora.sql;+
  
 </code> </code>
 +
 +<code>
 +drop database pandora;
 +create database pandora;
 +use pandora;
 +source /var/www/html/pandora_console/pandoradb.sql;
 +source backup_pandora.sql;
 +
 +</code>
 +
 +  * The necessary permissions (grants) must be added again; //if you are not logged in//  to ''mysql''  as **root**  user (replace with the corresponding password) run:
 +
 +  * 必要なアクセス許可を再度追加する必要があります。 ''mysql'' に//ログインしていない場合// は、 **root** ユーザ(パスワードは対応するものを利用)として以下を実行します:
 +
 +<code>
 +mysql -u root -p <password>
 +
 +</code>
 +
 +  * **Once logged in as root execute the following commands:**
 +  * Deactivate the password validation plugin (optional).
 +
 +  * **root としてログインしてら次のコマンドを実行します。**
 +  * パスワード検証プラグインを無効にします(オプション)。
 +
 +<code>
 +UNINSTALL COMPONENT 'file://component_validate_password';
 +
 +</code>
 +
 +  * Create the login user if it does not exist:
 +
 +  * ログインユーザが存在しない場合は作成します。
 +
 +<code>
 +CREATE USER "<DBUSER>"@'%' IDENTIFIED BY "<DBPASS>";
 +
 +</code>
 +
 +<WRAP center round tip 60%>
 +
 +//**Note**//  : if you want to restrict the IP address of connection to the database, you must change the ''%''  to the IP address of the connection source.
 +
 +</WRAP>
 +
 +<WRAP center round tip 60%>
 +
 +//**注意**// : データベースへの接続 IP アドレスを制限したい場合は、''%'' を接続元の IP アドレスに変更する必要があります。
 +
 +</WRAP>
 +
 +  * Assign the native password for ''mysql'':
 +
 +  * ''mysql'' にネイティブパスワードを設定します。
 +
 +<code>
 +ALTER USER "<DBUSER>"@'%' IDENTIFIED WITH mysql_native_password BY "<DBPASS>";
 +
 +</code>
 +
 +  * Grant grants on Pandora FMS database (''pandora''):
 +
 +  * Pandora FMS データベース(''pandora'')に対して grant を行います。
 +
 +<code>
 +GRANT ALL PRIVILEGES ON pandora.* TO "<DBUSER>"@'%';
 +
 +</code>
 +
 +  * Save the changes and exit:
 +
 +  * 変更を保存して抜けます。
 +
 +<code>
 +flush privileges;
 +exit
 +
 +</code>
 +
 +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:
行 338: 行 436:
  
 </code> </code>
 +
 +  * If **you do not have an HA environment**, disable the binary logs with the following command in the ''[mysqld]''  section:
 +
 +  * **HA 環境が無い場合**は、''[mysqld]'' セクションの次のコマンドでバイナリログを無効化します。
 +
 +<code>
 +skip-log-bin
 +
 +</code>
 +
 +<WRAP center round tip 60%>
 +
 +See also "[[:en:documentation:05_big_environments:08_optimization#check_mycnf_settings|Optimization and troubleshooting]]" for checking the ''my.cnf''  file.
 +
 +</WRAP>
 +
 +<WRAP center round tip 60%>
 +
 +''my.cnf'' ファイルのチェックには、"[[:ja:documentation:05_big_environments:08_optimization#mycnf_設定の確認|最適化と問題解決]]" も参照してください。
 +
 +</WRAP>
  
   * Start the MySQL service:   * Start the MySQL service:
行 387: 行 506:
  
 <code> <code>
-mysql -u root -p pandora +mysql -u root -p pandora 
-> drop database pandora; + 
-create database pandora; +</code> 
-use pandora; + 
-source /var/www/html/pandora_console/pandoradb.sql; +<code> 
-source backup_pandora.sql;+drop database pandora; 
 +create database pandora; 
 +use pandora; 
 +source /var/www/html/pandora_console/pandoradb.sql; 
 +source backup_pandora.sql;
  
 </code> </code>