If you have received this error, it means that one of the tables in the specified database has become corrupted and should be repaired.
This can happen when the MySQL service has restarted unexpectedly due to issues such as the server restarting, running out of space, etc. This leaves the table in question unusable until you repair it.
To repair the table, connect via SSH to your Linux server.
Once connected, run the mysqlcheck command. This command has many options, which you can find in the official MySQL documentation. For this issue, the one we need is:
# mysqlcheck -uusuario -p --databases nombre_de_base_de_datos --auto-repairThe command above will check all the tables in the database you specify and, if it finds any corrupted tables, will proceed to repair them. You must also specify the user who owns the database and the password, which you will be prompted for once you run the command.
To check all tables and databases, use the following command:
# mysqlcheck -uusuario -p --all-databases --auto-repairIn the official MySQL documentation, you can find many options for running mysqlcheck that may be better suited to your situation than the one described in this post.