Home >Database >Mysql Tutorial >What should I do if the id of the MySQL database does not increase?
After the data was submitted successfully, the ID of the MYSQL database did not increase. I was very puzzled. After a closer look, I found the problem. It turned out that the ID of the data field was 0, which caused the ID not to increase.
1. Take registration as an example, use a browser to open the registration interface, fill in the registration information, as follows Show.
#2. Then click submit and registration will appear Success interface, this interface is normal and not controversial.
##4. When we continue in the data When adding data, it will not be successful, and the error "Duplicate entry '0' for key 'PRIMARY' will appear."
5. In this case, we need to change the ID of the database, let the data grow automatically, and open the database Structure, find the ID, and click Modify in the lower left corner, as the arrow has pointed out.
##6. Enter the modification interface and find A_I option, check the option, and click Go.
##7. After the modification is successful, there will be Tips below.
##8. After successfully modifying the database, we continue Add data and find that the addition is successful and the data ID starts from 1.
##9. This is not yet verification. At the end, we continue to add registration data and find that the ID is increasing, which indicates that the problem is solved.
The above is the detailed content of What should I do if the id of the MySQL database does not increase?. For more information, please follow other related articles on the PHP Chinese website!