相关推荐recommended
The MySQL server is running with the LOCK
作者:mmseoamin日期:2023-12-18

今天发现mysql报错,记录下问题原因;

错误信息:The MySQL server is running with the LOCK_WRITE_GROWTH option so it cannot execute this statement

向aliyun 写入数据报错。阿里云的一个保护策略,空间剩余不足时,禁止数据写入;

可用navicat执行以下sql查看剩余空间大小;

SELECT

TABLE_SCHEMA,

concat( TRUNCATE ( sum( data_length )/ 1024 / 1024, 2 ), ‘MB’ ) AS data_size,

concat( TRUNCATE ( sum( index_length )/ 1024 / 1024, 2 ), ‘MB’ ) AS index_size

FROM

information_schema.TABLES

GROUP BY

TABLE_SCHEMA

ORDER BY

data_length DESC;

注释:

table_schema:数据库名

table_name:表名

table_rows:记录数

data_length:数据大小

index_length:数据库剩余容量

engine:所使用的存储引擎