MySQL fields have various types and their lengths are different. The following describes the length of various MySQL fields for your reference.
Value Type
Storage required for column types
TINYINT 1 byte
SMALLINT 2 bytes
MEDIUMINT 3 bytes
INT 4 bytes
INTEGER 4 bytes
BIGINT 8 bytes
FLOAT (X) 4 bytes if X <= 24 or 8 If 25 <= X <= 53)
FLOAT 4 bytes
DOUBLE 8 bytes
Double precision 8 bytes
REAL 8 bytes
DECIMAL (M, D) M bytes D + 2, if M <D)
NUMERIC (M, D) M bytes D + 2, if M <D)
Date and Time Type
Storage required for column types
DATE 3 bytes
DATETIME 8 bytes
TIMESTAMP 4 bytes
TIME 3 bytes
YEAR 1 byte
String type
Storage required for column types
CHAR (M) M bytes, 1 <= M <= 255
VARCHAR (M) L + 1 byte, where L <= M and 1 <= M <= 255
TINYBLOB, tinytext l + 1 byte, here L <2 ^ 8
BLOB, text l + 2 bytes, here L <2 ^ 16
MEDIUMBLOB, mediumtext l + 3 bytes, here L <2 ^ 24
LONGBLOB, longtext l + 4 bytes, here L <2 ^ 32
ENUM ('value1 ', 'value2',...) 1 or 2 bytes, depending on the maximum number of enumeration values 65535)
SET ('value1 ', 'value2',...) 1, 2, 3, 4, or 8 bytes, depending on the maximum number of members in the SET)
Implementation of MySQL Field Auto-Increment
How MySQL defines foreign keys
Seven considerations for converting MySQL to Oracle
Detailed description of MySQL foreign key settings
Detailed description of the actual configuration of SlowLog in MySQL