Depending on whether you are using an unsigned integer or not, and which version of MySQL you are using, you start a skating rink to receive negative negative values โโfor the primary key or (even worse), the line simply will not be inserted and will throw an error.
However, you can easily change the size / type of an integer in MySQL with the ALTER command to preventively stop this. The "standard" size for INT, used as the primary key, is INT (11), but the vast majority of database applications do not need something almost so big. Try MEDIUMINT.
MEDIUMINT - Signature range: -8388608 to 8388607. Unsigned range 0 to 16777215
Compared with....
INT or INTEGER. Signature range: -2147483648 to 2147483647. Unsigned range from 0 to 4294967295
There is also a BIGINT, but to be honest, you probably have a lot more scalability issues than your data types to worry about if the table has s> 2 billion rows :)
source share