There are various ways of getting the last ID, including Max() and Last_insert_id functions...
How to set it, is what I'm struggling with...
So what I ended up doing is a Dump, then I modified the following line:
") ENGINE=InnoDB AUTO_INCREMENT=5358 DEFAULT CHARSET=utf8;"
by setting the AUTO_INCREMENT=1. Then imported the whole thing again.
It works, though I'd love to know a more elegant way to do it.
All the best,
mvreade