差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:07_technical_annexes:19_mysql_8 [2022/06/08 12:51] – [CentOS 7] junichi | ja:documentation:07_technical_annexes:19_mysql_8 [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== MySQL 5.7 から MySQL 8 へのアップグレード ====== | ||
- | |||
- | {{indexmenu_n> | ||
- | |||
- | [[ja: | ||
- | |||
- | ===== 前提条件 ===== | ||
- | |||
- | * Open a terminal window with the **root** | ||
- | |||
- | * **root** ユーザにてターミナルウインドウを開き、次のコマンドを実行します。 | ||
- | < | ||
- | |||
- | mysql --version | ||
- | |||
- | </ | ||
- | |||
- | You will get an answer similar to the following: | ||
- | |||
- | 次のような出力が得られます。 | ||
- | |||
- | < | ||
- | mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper | ||
- | |||
- | </ | ||
- | |||
- | * Perform a data backup procedure. See " | ||
- | |||
- | * データバックアップ手順を実行します。詳細は、[[: | ||
- | |||
- | ===== CentOS 7 ===== | ||
- | |||
- | * Stop the PFMS server and the PFMS Software Agent: | ||
- | |||
- | * Pandora FMS サーバと Pandora FMS ソフトウエアエージェントを停止します。 | ||
- | < | ||
- | |||
- | / | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Stop the Apache web server: | ||
- | |||
- | * Apache Web サーバを停止します。 | ||
- | < | ||
- | systemctl stop httpd.service | ||
- | |||
- | </ | ||
- | |||
- | Either: | ||
- | |||
- | または、 | ||
- | |||
- | < | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Make a special database backup that is compatible with MySQL 8: | ||
- | |||
- | * MySQL 8 に互換性がある特別なデータベースバックアップを作成します。 | ||
- | < | ||
- | 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 での通常のバックアップを作成します。(このバージョンに戻す場合の追加の保険です) | ||
- | < | ||
- | mysqldump -u root -p pandora> backup_pandora_5.7.sql | ||
- | |||
- | </ | ||
- | |||
- | * Back up the MySQL configuration file ('' | ||
- | |||
- | * MySQL 設定ファイル('' | ||
- | < | ||
- | cp /etc/my.cnf / | ||
- | |||
- | </ | ||
- | |||
- | * Delete the Percona 5 repositories: | ||
- | |||
- | * Percona 5 リポジトリを削除します。 | ||
- | < | ||
- | rpm -qa | grep Percona-Server | xargs rpm -e --nodeps | ||
- | |||
- | </ | ||
- | |||
- | * Install the Percona 8 repositories: | ||
- | |||
- | * Percona 8 リポジトリをインストールします。 | ||
- | < | ||
- | |||
- | yum install https:// | ||
- | |||
- | </ | ||
- | |||
- | * Enable the repositories from the previous step: | ||
- | |||
- | * 前述のリポジトリを有効化します。 | ||
- | < | ||
- | percona-release setup ps80 | ||
- | |||
- | </ | ||
- | |||
- | * Install Percona 8 | ||
- | |||
- | * Percona 8 をインストールします。 | ||
- | < | ||
- | yum install percona-server-server | ||
- | |||
- | </ | ||
- | |||
- | * Restore the file '' | ||
- | |||
- | * '' | ||
- | < | ||
- | mv / | ||
- | |||
- | </ | ||
- | |||
- | * Modify the '' | ||
- | |||
- | * '' | ||
- | < | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | |||
- | </ | ||
- | |||
- | * Start the MySQL service: | ||
- | |||
- | * MySQL サービスを起動します。 | ||
- | < | ||
- | systemctl start mysql | ||
- | |||
- | </ | ||
- | |||
- | or: | ||
- | |||
- | または、 | ||
- | |||
- | < | ||
- | service mysqld start | ||
- | |||
- | </ | ||
- | |||
- | * Verify the version installed with: | ||
- | |||
- | * インストールされたバージョンを確認します。 | ||
- | < | ||
- | 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 互換バックアップをインポートします。 | ||
- | |||
- | < | ||
- | # mysql -u root -p pandora> drop database pandora;> | ||
- | > source backup_pandora.sql; | ||
- | |||
- | </ | ||
- | |||
- | * Start the PFMS server and the PFMS Software Agent: | ||
- | |||
- | * Pandora FMS サーバおよび Pandora FMS ソフトウエアエージェントを起動します。 | ||
- | < | ||
- | / | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Stop the Apache web server: | ||
- | |||
- | * Apache Web サーバを起動します。 | ||
- | < | ||
- | systemctl start httpd.service | ||
- | |||
- | </ | ||
- | |||
- | Either: | ||
- | |||
- | または、 | ||
- | |||
- | < | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ||
- | |||
- | * Stop the PFMS server and the PFMS Software Agent: | ||
- | |||
- | < | ||
- | / | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Stop the Apache web server: | ||
- | |||
- | < | ||
- | systemctl stop httpd.service | ||
- | |||
- | </ | ||
- | |||
- | Either: | ||
- | |||
- | < | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Make a special database backup that is compatible with MySQL 8: | ||
- | |||
- | < | ||
- | 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): | ||
- | |||
- | < | ||
- | mysqldump -u root -p pandora> backup_pandora_5.7.sql | ||
- | |||
- | </ | ||
- | |||
- | * Back up the MySQL configuration file ('' | ||
- | |||
- | < | ||
- | cp /etc/my.cnf / | ||
- | |||
- | </ | ||
- | |||
- | * Delete the Percona 5 repositories: | ||
- | |||
- | < | ||
- | rpm -qa | grep Percona-Server | xargs rpm -e --nodeps | ||
- | |||
- | </ | ||
- | |||
- | * Install the Percona 8 repositories: | ||
- | < | ||
- | |||
- | dnf install https:// | ||
- | |||
- | </ | ||
- | |||
- | * Enable the repositories from the previous step: | ||
- | |||
- | < | ||
- | percona-release setup ps80 | ||
- | |||
- | </ | ||
- | |||
- | * Install Percona 8 | ||
- | |||
- | < | ||
- | dnf install percona-server-server | ||
- | |||
- | </ | ||
- | |||
- | * Restore the file '' | ||
- | |||
- | < | ||
- | mv / | ||
- | |||
- | </ | ||
- | |||
- | * Modify the '' | ||
- | |||
- | < | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | sed -i -e " | ||
- | |||
- | </ | ||
- | |||
- | * Start the MySQL service: | ||
- | |||
- | < | ||
- | systemctl start mysql | ||
- | |||
- | </ | ||
- | |||
- | or: | ||
- | |||
- | < | ||
- | service mysqld start | ||
- | |||
- | </ | ||
- | |||
- | * Verify the version installed with: | ||
- | |||
- | < | ||
- | 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 -u root -p pandora> drop database pandora;> | ||
- | > source backup_pandora.sql; | ||
- | |||
- | </ | ||
- | |||
- | * Start the PFMS server and the PFMS Software Agent: | ||
- | |||
- | < | ||
- | / | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | * Stop the Apache web server: | ||
- | |||
- | < | ||
- | systemctl start httpd.service | ||
- | |||
- | </ | ||
- | |||
- | Either: | ||
- | |||
- | < | ||
- | / | ||
- | |||
- | </ | ||
- | |||
- | [[: | ||
- | |||