Unfortunately, MySQL is degraded with time, and this affects the global performance of the system.There is no other solution that does not involve rebuilding all the database schemes from scratch, rebuilding the data binary file that MySQL uses to store all the information and the files used to rebuild the transactions.
+
<code bash>
+
systemctl stop pandora_ha
-
時間ともに MySQL のパフォーマンスが落ちると、システム全体のパフォーマンスに影響します。この場合は、すべてのデータベーススキーマをゼロから再構築する以外に解決策はありません。MySQL がデータの保存に利用しているバイナリファイルを利用し、またそれを再構築します。
+
</code>
-
If you take a look at the ''/var/lib/mysql'' directory, you may see that there are three files, that have always the same name, and that are, depending on the severity of the case, huge. In this example:
+
Secondly, an export of all schemas and data must be done. Choose a directory of the machine, in a partition that has enough space to store the backup of the database in case it is a large database. The following command is executed:
The ''ibdata1'' file is the one that stores all the system Innobd data. In a very fragmented system that has not been "rebuilt" or "installed" for a long time, this system will be big but little efficient. The ''innodb_file_per_table'' parameter, that was [[#ks1_3|mentioned before]], regulates part of this performance.
- Dump (via **mysqldump**) all the schemes to the disk:
+
</code>
+
+
Access the MySQL installation directory in ''/var/lib/mysql'' and delete the files named ''binlog.000001'', ''binlog.000002'' … and ''binlog.index''. In addition, we will delete the directory with the same name as the database ''pandora''.
-
- すべてのスキーマをディスクにダンプします (**mysqldump** 経由)。
+
MySQL インストールディレクトリ (''/var/lib/mysql'') にアクセスし、''binlog.000001''、''binlog.000002''、… および ''binlog.index'' という名前のファイルを削除します。さらに、データベース ''pandora'' と同じ名前のディレクトリも削除します。
<code bash>
<code bash>
-
mysqldump -u root -p -A> alldata.sql
+
rm -rf /var/lib/mysql/pandora
+
rm -rf /var/lib/mysql/binlog.0*
+
rm -rf /var/lib/mysql/binlog.index
</code>
</code>
-
* Stop MySQL.
+
Once these steps are done, we will start MySQL again with:
-
* Delete ''ibdata1'', ''ib_logfile0'', ''ib_logfile1'' and the InnoDB database directories
+
-
* Start MySQL.
+
-
* Create ''pandora'' database again (''create database pandora;'')
Access the MySQL terminal with the following command:
+
+
次のコマンドで MySQL ターミナルにアクセスします。
+
+
<code bash>
+
mysql -uroot -p pandora
+
+
</code>
+
+
The ''pandora'' database will be selected, but it will be empty. The following command is used to import in the database the //backup// that we did from the Pandora FMS database:
This tool is located in the <wrap :en>**Management → Admin tools → Diagnostic Info**</wrap> section, and is designed to provide the most important information about Pandora FMS configuration and its database.
+
This tool is located in the <wrap :en>**Management → Admin tools → Diagnostic Info**</wrap> section, and is conceived to provide the most important information about Pandora FMS configuration and its database.