DrDroid

MySQL 1021: Disk full.

👤

Stuck? Let AI directly find root cause

AI that integrates with your stack & debugs automatically | Runs locally and privately

Download Now

What is MySQL 1021: Disk full.

Check the disk space usage:

- Run `df -h` to identify the disk usage and see if the disk is indeed full.

Identify large tables or logs consuming space:

- Connect to the MySQL server: `mysql -u username -p` - Check table sizes: `SELECT tableschema AS "Database", ROUND(SUM(datalength + indexlength) / 1024 / 1024, 2) AS "Size (MB)" FROM informationschema.TABLES GROUP BY table_schema;` - Check binary log usage: `SHOW BINARY LOGS;`

Free up space:

- If logs are consuming space, purge binary logs by executing: `PURGE BINARY LOGS TO 'mysql-bin.010';` (replace `mysql-bin.010` with the name of one of the latest few logs). - If specific tables are identified as large, consider archiving old data and then deleting it from the table: `DELETE FROM table_name WHERE condition;` (ensure to have a backup before doing this).

Optimize tables after cleanup to reclaim space:

- Run `OPTIMIZE TABLE table_name;` for the tables you've cleaned up.Remember to replace `username`, `mysql-bin.010`, `table_name`, and `condition` with your actual MySQL username, the specific binary log file, the actual table names, and the conditions for rows you want to delete, respectively.

MySQL 1021: Disk full.

TensorFlow

  • 80+ monitoring tool integrations
  • Long term memory about your stack
  • Locally run Mac App available
Read more

Time to stop copy pasting your errors onto Google!