It has worked so far, but when I restart the service, the database has lost the auto-increment value for my table. This is probably something I do with my queries because I have not recently modified my tables. What could it be?
This is documented behavior, this is not a mistake.When the server starts, it goes through each table (InnoDB), which determines what the new auto_increment value should be. From http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-handling.html :
InnoDB . , InnoDB , .
- DDL, , , engine - , .
engine
ALTER TABLE _ ENGINE = MyISAM
. InnoDB AI , reset + 1 mysql. , , reset 1.
MyISAM, , .