Page 1 of 1

mariadb problem.

Posted: Fri Jan 24, 2020 11:22 am
by exp-user1
Hello,

I have the following ERROR in mariadb.log file :
200124 9:39:57 [ERROR] mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed

and a huge number of these warnings thrown in the log continuously:
200124 9:39:52 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO nagios_servicestatus....


and logentries table is NULL:

[root@olexpnagiosp01 ~]# echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -uroot -pnagiosxi --table|grep nagios_log
| nagios_logentries | NULL |

we had incident since two days cause a lot of server to be unreachable for couple of hours, i am not sure if that affected the logentries to be NULL

I am thinking of running /usr/local/nagiosxi/scripts/repair_databases.sh


could you share the best actions to do?

Thanks.

Re: mariadb problem.

Posted: Fri Jan 24, 2020 11:28 am
by scottwilkerson
exp-user1 wrote:I have the following ERROR in mariadb.log file :
200124 9:39:57 [ERROR] mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
exp-user1 wrote: I am thinking of running /usr/local/nagiosxi/scripts/repair_databases.sh


could you share the best actions to do?
Yes, this is the best action to do to fix the crashed tables.

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh