How to set a varchar to have unlimited length?

VARCHAR can store upto 255 chars before MySQL 5.0.3 and 65,535 chars in 5.0.3 and later versions.

To store large data in Mysql database you can use

TEXT , MEDIUMTEXT , LONGTEXT

TEXT can store 65,535 characters (approx 64KB)
MEDIUMTEXT = 16,777,215 characters (approx 16 MB) 
LONGTEXT = 4,294,967,295 chars (approx 4GB)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)