Home Database Mysql Tutorial What should I do if the id of the MySQL database does not increase?

What should I do if the id of the MySQL database does not increase?

Aug 08, 2017 pm 03:27 PM
mysql what to do database

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.

What should I do if the id of the MySQL database does not increase?

1. Take registration as an example, use a browser to open the registration interface, fill in the registration information, as follows Show.

What should I do if the id of the MySQL database does not increase?


#2. Then click submit and registration will appear Success interface, this interface is normal and not controversial.

What should I do if the id of the MySQL database does not increase?


#3. Next let’s look at the database , we see that the ID of the database is 0, and the correct ID starts from 1.

What should I do if the id of the MySQL database does not increase?


##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."

What should I do if the id of the MySQL database does not increase?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.

What should I do if the id of the MySQL database does not increase?


##6. Enter the modification interface and find A_I option, check the option, and click Go.

What should I do if the id of the MySQL database does not increase?

##7. After the modification is successful, there will be Tips below.

What should I do if the id of the MySQL database does not increase?

##8. After successfully modifying the database, we continue Add data and find that the addition is successful and the data ID starts from 1.

What should I do if the id of the MySQL database does not increase?

##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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if I forget my Ouyi Wallet mnemonic phrase? Can it still be found? What should I do if I forget my Ouyi Wallet mnemonic phrase? Can it still be found? Jul 19, 2024 pm 12:13 PM

In the Web3 world, although it is free, it is full of dangers. Therefore, the first step in the security of Ouyi wallet is to protect the private key and mnemonic phrase. Everyone knows the importance of private keys, and today the emphasis is on mnemonics. The mnemonic phrase can be understood as another form of presentation of the private key. Having the mnemonic phrase is equivalent to owning the private key and controlling the wallet assets. It is also thought that its presence is lower than that of the private key, and users may forget the mnemonic phrase of Ouyi Wallet. So what should I do if I forget the mnemonic phrase of Ouyi Wallet? Can I still retrieve my Ouyi Wallet mnemonic if I forget it? Issues that users need to pay attention to. Generally speaking, if the mnemonic phrase is forgotten, it cannot be retrieved, but try to contact the relevant customer service personnel for help. The editor below will tell you in detail. What should I do if I forget my Ouyi Wallet mnemonic phrase? If you forget the mnemonic phrase of Ouyi Wallet, please try to recall it or contact us.

How to solve the rustling sound during TV playback (eliminate TV rustling sound) How to solve the rustling sound during TV playback (eliminate TV rustling sound) Jul 21, 2024 pm 03:29 PM

With the advancement of technology and people's increasing demand for high-definition picture quality, TV has become an indispensable part of home entertainment. However, sometimes you may hear an annoying rustling sound while watching TV, which not only affects the viewing experience, but may also cause the TV to malfunction. This article will introduce some methods to solve the rustling sound during TV playback, so that you can enjoy a higher quality movie viewing experience. 1: Check whether the audio cable connection is loose. If there is a rustling sound when the TV is playing, first check whether the audio cable connection is firm. Make sure both ends of the audio cable are plugged into the correct connectors and check for loose connections or poor connections. Two: Adjust the TV volume and audio device settings. Appropriately adjusting the TV volume and audio device settings will help eliminate rustling sounds. try

How to fix mysql_native_password not loaded errors on MySQL 8.4 How to fix mysql_native_password not loaded errors on MySQL 8.4 Dec 09, 2024 am 11:42 AM

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

The computer does not have Bluetooth, how to solve it (how to quickly add Bluetooth function and precautions) The computer does not have Bluetooth, how to solve it (how to quickly add Bluetooth function and precautions) Jun 29, 2024 pm 06:57 PM

In modern society, Bluetooth has become an indispensable technology in our daily lives. However, for some older computers, they may not have built-in Bluetooth functionality. What if your computer does not have Bluetooth and you want to use a Bluetooth device? This article will introduce you to several methods and precautions for quickly adding Bluetooth functionality. 1. Use a Bluetooth adapter - A Bluetooth adapter is an external device that can be connected to a computer through a USB interface. -Purchase a compatible Bluetooth adapter and install the driver according to the instructions. -Plug the Bluetooth adapter into the USB port of your computer and wait for the system to automatically install the driver. 2. Check the driver 1. Check if there is a Bluetooth device on the computer. Open the device manager and check if there is a Bluetooth device. if not

How to create a MySQL table using PHP? How to create a MySQL table using PHP? Jun 04, 2024 pm 01:57 PM

Creating a MySQL table using PHP requires the following steps: Connect to the database. Create the database if it does not exist. Select a database. Create table. Execute the query. Close the connection.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

Methods to solve the problem of insomnia (secrets to deep sleep) Methods to solve the problem of insomnia (secrets to deep sleep) Aug 22, 2024 pm 06:04 PM

Sleep is an important part of human health, and long-term insomnia not only affects the normal functions of the body, but also puts a certain amount of pressure on mental health. In order to help those friends who often stay up late and suffer from insomnia, this article will provide some scientific and effective solutions to help you enter deep sleep and say goodbye to the trouble of insomnia. How to solve the problem of insomnia Causes of insomnia Understand the various possible causes of insomnia, such as stress, anxiety, sleep environment, living habits, etc. Improve the sleeping environment. Adjust the sleeping environment to create a quiet, comfortable and warm environment, such as adjusting light, reducing noise, etc. Regular sleep habits Form regular sleep habits, establish the same bedtime and wake-up time every day, and develop good sleep habits. Relax your mind and body using relaxation techniques such as deep breathing, meditation, warm water soaking, etc.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

See all articles