//查看数据库版本
select version()
8.0.12
//修改自增值
alter table `database`.table auto_increment=555;
//查看自增值1(只修改where字段后的数据库和数据表名)
//表的基本数据是存放在mysql的information_schema库的tables表中
select auto_increment
from information_schema.tables
where table_schema='skyom-portal' and table_name='portal_sdk_config';
//查看自增值2
show create table `tableName`
PS:
auto_increment_increment:自增值的自增量
auto_increment_offset: 自增值的偏移量
SHOW VARIABLES LIKE 'auto_inc%'
MySQL修改自增字段的自增值
于 2021-11-12 09:38:59 首次发布