How to solve Duplicate entry 16777215 for key PRIMARY'
An error was reported directly when the customer forum posted the message: Duplicate entry 16777215 for key PRIMARY. After investigation, it was found that the database field had reached the maximum value of the set type. Friends in need can refer to the following:
Be careful to back up the database first to avoid unnecessary losses.
1. Error prompt:
(1062) Duplicate entry '16777215' for key 'PRIMARY' INSERT INTO common_member_action_log SET `uid`='1243282' , `action`='0' , `dateline`='1586228418'
2. Reason for the error:
The tid field is of type MEDIUMINT, and the maximum number is 17777215.
3. Solution:
Change the corresponding MEDIUMINT to int(11).
© Website copyright and disclaimer
1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;
2. No one is allowed to copy it without the express written permission of [honmau Media];
3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;
4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;
5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice