ja:documentation:07_technical_annexes:19_mysql_8

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:07_technical_annexes:19_mysql_8 [2022/06/08 12:42] – [前提条件] junichija:documentation:07_technical_annexes:19_mysql_8 [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1
行 1: 行 1:
-====== MySQL 5.7 から MySQL 8 へのアップグレード ====== 
- 
-{{indexmenu_n>19}} 
- 
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] 
- 
-===== 前提条件 ===== 
- 
-  * Open a terminal window with the **root**  user and enter the following command: 
- 
-  * **root** ユーザにてターミナルウインドウを開き、次のコマンドを実行します。 
-<code> 
- 
-mysql --version 
- 
-</code> 
- 
-You will get an answer similar to the following: 
- 
-次のような出力が得られます。 
- 
-<code> 
-mysql  Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using  EditLine wrapper 
- 
-</code> 
- 
-  * Perform a data backup procedure. See "[[:en:documentation:07_technical_annexes:07_backup_and_restore_procedures|Backup and recovery procedures]]" for details. 
- 
-  * データバックアップ手順を実行します。詳細は、[[:ja:documentation:07_technical_annexes:07_backup_and_restore_procedures|バックアップおよびリストア手順]] を参照してください。 
- 
-===== CentOS 7 ===== 
- 
-  * Stop the PFMS server and the PFMS Software Agent: 
-<code> 
- 
-/etc/init.d/pandora_server stop 
-/etc/init.d/pandora_agent_daemon stop 
- 
-</code> 
- 
-  * Stop the Apache web server: 
- 
-<code> 
-systemctl stop httpd.service 
- 
-</code> 
- 
-Either: 
- 
-<code> 
-/etc/init.d/httpd stop 
- 
-</code> 
- 
-  * Make a special database backup that is compatible with MySQL 8: 
- 
-<code> 
-mysqldump -u root -p pandora \ 
-  --skip-add-drop-table \ 
-  --complete-insert \ 
-  --no-create-info> backup_pandora.sql 
- 
-</code> 
- 
-  * Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): 
- 
-<code> 
-mysqldump -u root -p pandora> backup_pandora_5.7.sql 
- 
-</code> 
- 
-  * Back up the MySQL configuration file (''my.cnf''): 
- 
-<code> 
-cp /etc/my.cnf /tmp/my.cnf.BACK 
- 
-</code> 
- 
-  * Delete the Percona 5 repositories: 
- 
-<code> 
-rpm -qa | grep Percona-Server | xargs rpm -e --nodeps 
- 
-</code> 
- 
-  * Install the Percona 8 repositories: 
-<code> 
- 
-yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm -y 
- 
-</code> 
- 
-  * Enable the repositories from the previous step: 
- 
-<code> 
-percona-release setup ps80 
- 
-</code> 
- 
-  * Install Percona 8 
- 
-<code> 
-yum install percona-server-server 
- 
-</code> 
- 
-  * Restore the file ''my.cnf'': 
- 
-<code> 
-mv /tmp/my.cnf.BACK /etc/my.cnf 
- 
-</code> 
- 
-  * Modify the ''my.cnf''  file to dispense with ''query_cache_*'': 
- 
-<code> 
-sed -i -e "s/^query_cache_type.*/#query_cache_type/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_size.*/#query_cache_size/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_min_res_unit.*/#query_cache_min_res_unit/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_limit.*/#query_cache_limit/g" /etc/my.cnf 
- 
-</code> 
- 
-  * Start the MySQL service: 
- 
-<code> 
-systemctl start mysql 
- 
-</code> 
- 
-or: 
- 
-<code> 
-service mysqld start 
- 
-</code> 
- 
-  * Verify the version installed with: 
- 
-<code> 
-mysql --version 
- 
-</code> 
- 
-You will get an answer similar to the following: 
- 
-<code> 
-mysql  Ver 8.0.28-19 for Linux on x86_64 (Percona Server (GPL), Release 19, Revision 31e88966cd3) 
- 
-</code> 
- 
-  * Now use MySQL's own command line and: 
-      * Delete the ''pandora''  database. 
-      * Create a new ''pandora''  database. 
-      * Open the ''pandora''  database and import the schema found in the PFMS Web Console. 
-      * Import the data that special MySQL 8 compatible backup. 
- 
-<code> 
-# 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> 
- 
-  * Start the PFMS server and the PFMS Software Agent: 
- 
-<code> 
-/etc/init.d/pandora_server start 
-/etc/init.d/pandora_agent_daemon start 
- 
-</code> 
- 
-  * Stop the Apache web server: 
- 
-<code> 
-systemctl start httpd.service 
- 
-</code> 
- 
-Either: 
- 
-<code> 
-/etc/init.d/httpd start 
- 
-</code> 
- 
-===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== 
- 
-  * Stop the PFMS server and the PFMS Software Agent: 
- 
-<code> 
-/etc/init.d/pandora_server stop 
-/etc/init.d/pandora_agent_daemon stop 
- 
-</code> 
- 
-  * Stop the Apache web server: 
- 
-<code> 
-systemctl stop httpd.service 
- 
-</code> 
- 
-Either: 
- 
-<code> 
-/etc/init.d/httpd stop 
- 
-</code> 
- 
-  * Make a special database backup that is compatible with MySQL 8: 
- 
-<code> 
-mysqldump -u root -p pandora \ 
-  --skip-add-drop-table \ 
-  --complete-insert \ 
-  --no-create-info> backup_pandora.sql 
- 
-</code> 
- 
-  * Make a backup as it is done in MySQL 5.7 (an additional insurance if you have to go back to this version): 
- 
-<code> 
-mysqldump -u root -p pandora> backup_pandora_5.7.sql 
- 
-</code> 
- 
-  * Back up the MySQL configuration file (''my.cnf''): 
- 
-<code> 
-cp /etc/my.cnf /tmp/my.cnf.BACK 
- 
-</code> 
- 
-  * Delete the Percona 5 repositories: 
- 
-<code> 
-rpm -qa | grep Percona-Server | xargs rpm -e --nodeps 
- 
-</code> 
- 
-  * Install the Percona 8 repositories: 
-<code> 
- 
-dnf install https://repo.percona.com/dnf/percona-release-latest.noarch.rpm -y 
- 
-</code> 
- 
-  * Enable the repositories from the previous step: 
- 
-<code> 
-percona-release setup ps80 
- 
-</code> 
- 
-  * Install Percona 8 
- 
-<code> 
-dnf install percona-server-server 
- 
-</code> 
- 
-  * Restore the file ''my.cnf'': 
- 
-<code> 
-mv /tmp/my.cnf.BACK /etc/my.cnf 
- 
-</code> 
- 
-  * Modify the ''my.cnf''  file to dispense with ''query_cache_*'': 
- 
-<code> 
-sed -i -e "s/^query_cache_type.*/#query_cache_type/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_size.*/#query_cache_size/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_min_res_unit.*/#query_cache_min_res_unit/g" /etc/my.cnf 
-sed -i -e "s/^query_cache_limit.*/#query_cache_limit/g" /etc/my.cnf 
- 
-</code> 
- 
-  * Start the MySQL service: 
- 
-<code> 
-systemctl start mysql 
- 
-</code> 
- 
-or: 
- 
-<code> 
-service mysqld start 
- 
-</code> 
- 
-  * Verify the version installed with: 
- 
-<code> 
-mysql --version 
- 
-</code> 
- 
-You will get an answer similar to the following: 
- 
-<code> 
-mysql  Ver 8.0.28-19 for Linux on x86_64 (Percona Server (GPL), Release 19, Revision 31e88966cd3) 
- 
-</code> 
- 
-  * Now use MySQL's own command line and: 
-      * Delete the ''pandora''  database. 
-      * Create a new ''pandora''  database. 
-      * Open the ''pandora''  database and import the schema found in the PFMS Web Console. 
-      * Import the data that special MySQL 8 compatible backup. 
- 
-<code> 
-# 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> 
- 
-  * Start the PFMS server and the PFMS Software Agent: 
- 
-<code> 
-/etc/init.d/pandora_server start 
-/etc/init.d/pandora_agent_daemon start 
- 
-</code> 
- 
-  * Stop the Apache web server: 
- 
-<code> 
-systemctl start httpd.service 
- 
-</code> 
- 
-Either: 
- 
-<code> 
-/etc/init.d/httpd start 
- 
-</code> 
- 
-[[:en:documentation:start|Go back to Pandora FMS documentation index]] 
- 
  
  • ja/documentation/07_technical_annexes/19_mysql_8.1654692128.txt.gz
  • 最終更新: 2022/06/08 12:42
  • by junichi