ALTER TABLE `table_name` DROP `auto_colmn`;ALTER TABLE `table_name` ADD `auto_colmn` INT( {many you want} ) NOT NULL AUTO_INCREMENT FIRST ,ADD PRIMARY KEY (`auto_colmn`);
$con = mysqli_connect($dbhost, $dbuser, $dbpass, $database);$res = mysqli_query($con, "select * FROM data WHERE id LIKE id ORDER BY id ASC");
$count = 0;while ($row = mysqli_fetch_array($res)){$count++;
mysqli_query($con, "UPDATE data SET id='".$count."' WHERE id='".$row['id']."'");}echo 'Done reseting id';mysqli_close($con);