title: MySQL: column size limit
body: <p>I'm currently working on a Windows OS and I have installed MySQL community server 5.6.30 and everything is fine. I have a script that initializes the DB and again, everything works fine.</p>
  
  <p>Now I'm trying to run this script on a Linux environment -- same MySQL version -- and I get the following error:</p>
  
  <blockquote>
    <p>ERROR 1074 (42000) at line 3: Column length too big for column
    'txt' (max = 21845); use BLOB or TEXT instead</p>
  </blockquote>
  
  <p>Script -</p>
  
  <pre><code>DROP TABLE IF EXISTS text;
  CREATE TABLE `texts` (
    `id` BINARY(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
    `txt` VARCHAR(50000) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=INNODB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>Obviously there's some MySQL server configuration on my Windows OS that I need to replicate on Linux; can anyone share an ideas?</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>on AWS's RDS it also works and im pretty sure its just a service on top of linux so obviously its just a config issue.</p>
  
  <p>does any body knows how to reach varchar 50k with UTF8 ?. i dont want to use TEXT or MEDIUMTEXT or any else , just plain old varchar(size)</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>i appreciate the different solutions that were suggested but im not looking for a new solution im only looking for an answer as do why varchar(50k) works under windows and under linux it doesnt.
  Btw , im using charcter set UTF8 and collation utf8_general_ci .</p>
  
  <p><strong>Answer</strong></p>
  
  <p>to answer my own question , it was an issue with the SQL_MODE it was set to 
  STRICT_TRANS_TABLES and should have been removed.</p>