Applicable to:
- Plesk for Linux
Symptoms
-
Unable to restore a database backup:
[2017-08-09 14:18:55] ERR [panel] Cannot save cli call statistic DB query failed: SQLSTATE[HY000]: General error: 1036 Table 'CliCallsStat' is read only, query was: INSERT CliCallsStat (`util`, `command`, `lastExecutionDateTime`) VALUES (:util, :command, now()) ON DUPLICATE KEY UPDATE `count` = `count` + 1, `lastExecutionDateTime` = now()
-
The command
plesk repair db
returns the following error:InnoDB: Error: Table "mysql"."innodb_table_stats"
- MySQL 5.6 is used.
Cause
The table innodb_table_stats
is corrupted.
Resolution
-
Log in to the server via SSH.
-
Remove corrupted tables:
# rm -rf /var/lib/mysql/mysql/innodb_table_stats
-
Connect to the MySQL server:
# plesk db
-
Switch to the
mysql
database:MYSQL_LIN: mysql> use mysql;
-
Recreate
innodb_table_stats
table:MYSQL_LIN: mysql> CREATE TABLE `innodb_table_stats` (
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`n_rows` bigint(20) unsigned NOT NULL,
`clustered_index_size` bigint(20) unsigned NOT NULL,
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`database_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
Comments
1 comment
Mariadb server 10.5.15
ERROR 1050 (42S01): Table 'innodb_table_stats' already exists
Please sign in to leave a comment.