set @nextauto = (select auto_increment from information_schema.tables where table_schema=Database() and table_name='your table name' );
Last updated 9 Mar 2016