0

This is continued from:

https://stackoverflow.com/q/55071021/8644833

Mariadb shuts down after running for a minute or two. If I remove Mariadb and reinstall (keeping my databases), everything works fine. But if I reboot the system Mariadb exhibits the same issue as before. Which is that it will run for 90 seconds or so and then crash. There are no errors generated from this in /var/log/MySQL, and everything else has the same output as the original post.

All my databases checkout as ok.

I realize I may not be able to provide enough information to get an answer as to how to solve this issue. If that's the case could anyone instruct me on the best way to troubleshoot or reinstall without loosing my data. I have a backup of my WordPress database, but I don't know how to tell if it is part of what's causing the problem.

  • Anything in the log files? (Probably mysqld.err) Are you using the default my.cnf, or have you made changes? How much RAM? What is the setting of innodb_buffer_pool_size? – Rick James Mar 15 '19 at 19:03
  • Only errors were: [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired [ERROR] mysql.db: 1 client is using or hasn't closed the table properly 8gb of RAM with plenty of space left. innodb_buffer_pool_size was set to the default 128M. I got tired of fighting with this so I dumped my Wordpress databases, removed mariadb-server and installed mysql-server. Everything has been running fine since. – Phillip Brantley Mar 16 '19 at 5:21
1

These messages:

[ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired 
[ERROR] mysql.db: 1 client is using or hasn't closed the table properly

are a symptom of a crash and some MyISAM table(s) was open at the time of the crash.

The standard cure is to run

myisamchk --quick

More details: https://dev.mysql.com/doc/refman/5.7/en/myisam-table-close.html and https://dev.mysql.com/doc/refman/5.7/en/myisam-crash-recovery.html This is reasonably fast and avoids a reinstall.

A better cure is to switch to InnoDB, since it takes care of repairing itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.