Ran into the classic MySQL varchar limit issue the other day while working on a forum script. The default column for post content was varchar(255) and I needed to bump it to 2000 characters to accommodate longer posts. Tried altering the column directly in phpMyAdmin, but got #1074 - Too big column length for column 'text' (max = 255). Use BLOB instead. MySQL’s varchar is capped at 255 characters in certain storage engines or versions? Actually, the real limit is 65,535 bytes for row size, but the max effective length for a varchar is determined by the row format and character set. In practice, for UTF-8 you might hit limits sooner.
Switching to TEXT is the proper fix. TEXT columns have a limit of 65,535 bytes (about 65KB) which is more than enough for forum posts. But if you try to alter the table and get #1170 - BLOB column 'text' used in key specification without a key length, that’s because the column was part of an index. MySQL can’t index a BLOB/TEXT column without specifying a prefix length. So your options:
- Remove the index on that column (if the forum script doesn’t rely on it).
- Add a prefix length to the index:
ALTER TABLE your_table ADD INDEX (text(255));within the ALTER statement. - Use a separate lookup – move the long text out of the indexed column.
Most modern forum software (like Xisto’s own custom platform) uses TEXT or LONGTEXT for post content. If you’re editing an old script, check the PHP code for any character limits imposed there as well.
Step-by-step fix:
-- First, drop the index if it exists (assuming column is named 'text')
ALTER TABLE your_forum_posts DROP INDEX your_index_name;
-- Then change the column type to TEXT
ALTER TABLE your_forum_posts MODIFY text TEXT;
-- Recreate the index with a prefix length
ALTER TABLE your_forum_posts ADD INDEX (text(255));
Make sure to adjust the index name and table/column names to match your schema. Also, TEXT has a slightly different storage behavior – it’s stored off-row for large values, which might affect performance slightly, but it’s negligible for typical forum traffic.
If you need even larger sizes, consider MEDIUMTEXT (16MB) or LONGTEXT (4GB). But for a forum, TEXT is usually sufficient.

