MySQL Workbench auto increment disabled

MysqlMysql Workbench

Mysql Problem Overview


I am using Workbench version 6.3.5 Community and this is GUI question only.

When creating a new table auto increment check-box is disabled.
Is it a bug or I need to enable this some how in options?
And how to set start value and step for auto increment in GUI when creating a table?

workbench

Mysql Solutions


Solution 1 - Mysql

You need to set auto increment in tableenter image description here

Solution 2 - Mysql

As a work around, when you click the 'Apply' button and are presented with the generated script to review, you can actually edit that script. I ran into the issue you posted as well and just manually added AUTO_INCREMENT to the column definition I needed it applied to.

Solution 3 - Mysql

Just check the AI(Auto Increment) checkbox. No work around, that's why it's a workbench. Life made easy

Solution 4 - Mysql

You can do it this way

enter image description here

Halil Saltik

Solution 5 - Mysql

The field must be both datatype int and the primary key for the table.

Solution 6 - Mysql

If you are like me, and you are wondering how on earth to get to that primary-key, auto-increment checkbox etc:

  • Hover over the table name, in my example "persons"
  • A "spanner like icon" will appear
  • Click on it and that's it!

enter image description here



I am using MySQL Workbench 8.0 CE(v8.0.19)

Solution 7 - Mysql

Make sure the datatype is INT, not character based.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlexander IvanovView Question on Stackoverflow
Solution 1 - MysqlLukas IgnatavičiusView Answer on Stackoverflow
Solution 2 - MysqlmarchWestView Answer on Stackoverflow
Solution 3 - MysqlconnelblazeView Answer on Stackoverflow
Solution 4 - Mysqluser7396069View Answer on Stackoverflow
Solution 5 - MysqlbeforboatView Answer on Stackoverflow
Solution 6 - Mysqljumping_monkeyView Answer on Stackoverflow
Solution 7 - MysqlWole AjalaView Answer on Stackoverflow