this issue is seen on mysql 5.7 version. so any system running this version will see this error. this error is due to the new behavior introduced in 5.7 which fixed some of the old bugs. see below from their release notes.
Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs. For example, a statement such as CREATE TABLE t (i INT NULL PRIMARY KEY) is rejected. The same occurs for similar ALTER TABLE statements. (Bug #13995622, Bug #66987, Bug #15967545, Bug #16545198)
additional info here for reference:
this issue is seen on mysql 5.7 version. so any system running this version will see this error. this error is due to the new behavior introduced in 5.7 which fixed some of the old bugs. see below from their release notes.
Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs. For example, a statement such as CREATE TABLE t (i INT NULL PRIMARY KEY) is rejected. The same occurs for similar ALTER TABLE statements. (Bug #13995622, Bug #66987, Bug #15967545, Bug #16545198)