A MyISAM table on a cPanel host hits 4GB and starts returning “The table ‘foo’ is full.” Default MyISAM uses 4-byte data and index pointers, capping the table size at roughly 4GB. The fix in the MyISAM era was ALTER TABLE ... MAX_ROWS to enlarge the pointers. The fix in 2026 is converting to InnoDB, which has no such limit. Knowing both pathways helps when conversion is blocked and you need to keep MyISAM running for one more day.
What’s happening
MyISAM stores row data in .MYD files and indexes in .MYI files. The format includes a pointer to each row’s offset; by default that pointer is 4 bytes, addressing up to (2^32 - 1) bytes — about 4.3GB per table. Two ways to extend:
MAX_ROWSandAVG_ROW_LENGTHhints: tell MyISAM at table creation time that you expect more rows, and it allocates wider pointers. Applied via ALTER TABLE for existing tables.myisam_data_pointer_size = 6: increases the default pointer size to 6 bytes for new tables. Cap goes to ~256TB.
But: if you’re hitting 4GB on a MyISAM table in 2026, the right fix is converting to InnoDB. InnoDB has its own table size limits (64TB for a single file-per-table tablespace, basically irrelevant) and offers crash safety, row-level locking, foreign keys, and transaction support. The conversion article covers the process; this one covers the temporary fix while you plan the conversion.
How to verify
mysql -e "SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH FROM information_schema.TABLES WHERE ENGINE='MyISAM' AND DATA_LENGTH > 1000000000 ORDER BY DATA_LENGTH DESC"
mysql -e "SHOW VARIABLES LIKE 'myisam_data_pointer_size'"
mysql -e "SHOW CREATE TABLE acmecorp_legacy.big_table\G"
ls -lh /var/lib/mysql/acmecorp_legacy/big_table.*
The first query lists big MyISAM tables and their current data-length vs the max set by the pointer size. The CREATE TABLE shows whether MAX_ROWS / AVG_ROW_LENGTH were ever set.
The fix
Quick fix (extend the pointer):
- Raise the pointer size for this specific table:
The productALTER TABLE acmecorp_legacy.big_table MAX_ROWS=1000000000 AVG_ROW_LENGTH=100;MAX_ROWS * AVG_ROW_LENGTHgives MyISAM a hint about the expected size; it allocates the necessary pointer width. The ALTER rebuilds the table — slow on a 4GB table, holds a lock during the rebuild. - For new MyISAM tables (rare), set the global default in
/etc/my.cnf.d/cpanel.cnf:
Restart MySQL. New tables use 6-byte pointers.[mysqld] myisam_data_pointer_size = 6
Real fix (convert to InnoDB):
- Take a backup first:
mysqldump --single-transaction acmecorp_legacy.big_table > /tmp/big_table.sql. (Note:--single-transactionis for InnoDB; for MyISAM the table is implicitly locked for the dump duration.) - For a 4GB+ MyISAM table, use online schema change:
This creates a shadow InnoDB copy, copies rows incrementally, triggers ongoing changes forward, then swaps the table atomically. Site stays up during the operation.pt-online-schema-change --alter "ENGINE=InnoDB" D=acmecorp_legacy,t=big_table --execute - For smaller MyISAM tables, direct ALTER:
Holds a lock for the duration; schedule during a maintenance window.ALTER TABLE acmecorp_legacy.big_table ENGINE=InnoDB; - Verify post-conversion:
mysql -e "SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA='acmecorp_legacy' AND TABLE_NAME='big_table'" mysql -e "SELECT COUNT(*) FROM acmecorp_legacy.big_table" - Watch for full-text index issues: MyISAM full-text indexes use different stop words than InnoDB. If the application uses
MATCH ... AGAINST, expect different search results post-conversion. Tuneinnodb_ft_min_token_sizeif necessary.
For environments where MyISAM legacy is reaching the size ceiling across many customers, Stack Harbor’s managed cPanel operations team batches the conversion via pt-online-schema-change and verifies application behavior on each touched table.