问题
When I set a "INT" datatype of a column, It's looking like this "(11)" on Mysql Workbench alter table. So I can't set auto increment, foreign key... But There is no issue for enter a data like integer. Is that a bug?
Mysql Workbench Version: 6.1 (6.1.4.117773 build 1454)
OS: Windows 7 64 bit
Mysql Server Version: 5.6
回答1:
I assume aleblebi is a Turkish member. But I suppose, the problem can be seen on other locales too. First I will try to explain the problem and then I will write my solution in the end.
You can see the problem when you try to alter table using Workbench GUI (I am using version 8.0.15). "Datatype" column of the grid and "Data Type:" text box will show (11)
instead of INT(11)
, same problem can be seen in DATETIME
columns but this time data type boxes will completely be empty.
Problem also can be seen if you try to use "Synchronize With any Source..." wizard of the Workbench. At the end of the wizard you can see something like:
ALTER TABLE `TEST_1`.`TABLE_1`
CHANGE COLUMN `ID` `ID` (11) NULL DEFAULT NULL ,
DROP PRIMARY KEY;
instead of:
ALTER TABLE `TEST_1`.`TABLE_1`
CHANGE COLUMN `ID` `ID` INT(11) NULL DEFAULT NULL ,
DROP PRIMARY KEY;
I had the very same problem and I searched the web for a few days and couldn't find a solution (solution of camadan was not a success for me). At last I realized that it is not just INT
data type but also BIGINT
and DATETIME
data types has the very same problem.
So I concluded that every data type having an capital "I" letter in it has the very same problem. And in Turkish alphabet there are dotted capital letter İ
and normal letter I
which somehow breaks the Workbench only if you choose "Turkish (Turkey)" in Windows OS as "Regional format". (My OS is Windows 10 English)
So I solved the issue with just changing the "Regional format" setting of Windows 10 from "Turkish (Turkey)" to "English (United states)".
By the way, I left the "Country or Region" option as it is (it is still "Turkey" in Windows 10) and I always use "English (United States)" as "Language for non-Unicode programs" option in my Windows 10 development environment.
I hope this information will help somebody some day...
回答2:
Same problem with your other issue
Go to your Server->Options File and change these options to
Character-server-file => utf8 Collation-server => utf8_general_ci
来源:https://stackoverflow.com/questions/23276172/mysql-workbench-integer-datatype-bugint-changes-11