Your number is too large for a MySQL BIGINT column. If you read these docs - you see that the BIGINT data type cannot take such a large number (maximums are ±9223372036854775807 signed, or 18446744073709551615 unsigned). See this answer for a more comprehensive look through documentation - across different server types.
If you can change the type in the database, you might want to consider changing it to a NUMERIC field, or storing the number as a string, or converting it to a byte array and storing it as a binary blob.
EDIT:
For completeness - in case anyone is confused about what the 40
means in BIGINT(40)
. It means almost nothing. It certainly doesn't affect the size of number stored - that's always 8 bytes (64 bits). It is a hint to the database about how to display the number - i.e. display the first 40 digits. It might affect zero padding - e.g. if you put values 123456789
and 5
into a BIGINT(5)
column, they might well display as 123456789
and 00005
. Check the docs for other types available.
Note that the longest number a BigInt field can store is 20 digits long in base 10, so 40
really does mean almost nothing at all.