I am currently working on Windows, and I have installed the MySQL 5.6.30 community server, and everything is fine. I have a script that initializes the database and again, everything works fine.
Now I'm trying to run this script on a Linux environment - the same version of MySQL, and I get the following error:
ERROR 1074 (42000) in row 3: column length is too long for the 'txt' column (max = 21845); use BLOB or TEXT instead
Script -
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;
Obviously there is some MySQL server configuration in my Windows OS that I need to replicate to Linux; can anyone share ideas?
Update 1
it also works on AWS RDS, and I'm sure it is just a service on top of Linux, so obviously this is just a configuration problem.
, varchar 50k UTF8?. TEXT MEDIUMTEXT - , varchar ()
2
, , , , varchar (50k) , linux - .
Btw, im, charcter set UTF8 utf8_general_ci.
, SQL_MODE,
STRICT_TRANS_TABLES .