In this example i am going to explain How to reset AUTO INCREMENT to one in MySQL PHP.
There is many way to reset AUTO_INCREMENT to 1in MySQL
Run the query in your database.
<?php $host='localhost'; $username='root'; $password=''; $conn=mysqli_connect($host,$username,$password,"student"); mysqli_query($conn,"ALTER TABLE category AUTO_INCREMENT = 1"); echo "Auto_increment reset to 1 Successfully ! "; ?>