Applicable to:
- Plesk for Linux
Symptoms
- Unable to open Plesk with the following error:
CONFIG_TEXT: ERROR: Plesk\Exception\Database: DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: DELETE FROM `SessionContexts` WHERE (`sessionId` IN (SELECT `sessions`.`sess_id` FROM `sessions` WHERE (`modified` + `lifetime` < 1522082154)))
- The same error is shown using
plesk login
command:# plesk login
ERR [panel] Cannot save cli call statistic DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: INSERT CliCallsStat (`util`, `command`, `lastExecutionDateTime`) VALUES (:util, :command, now()) ON DUPLICATE KEY UPDATE `count` = `count` + 1, `lastExecutionDateTime` = now()
DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: INSERT INTO password_secrets (secret, type, id, created) VALUES ("", "1", "", now());
exit status 1 - MySQL configuration includes parameter
innodb_force_recovery
at level 4 or higher.# grep -r innodb_force_recovery /etc/my*
/etc/mysql/my.cnf:innodb_force_recovery = 6
Cause
InnoDB databases were in a non-finished recovery process, what causes InnoDB to be set in read-only mode according to MySQL Official Documentation.
Resolution
Complete InnoDB Databases recovery using the article How to fix InnoDB corruption cases for the MySQL database?
Comments
0 comments
Please sign in to leave a comment.