1、查看自己的表格设置及要自增的数据类型
命令 desc 表名;
然后输入命令 改变这一行的数据类型
alter table student change stu_id stu_id int primary key auto_increment;
然后添加行