mysql修改数据类型int出错,Mysql Workbench整数数据类型错误(INT更改>(11))

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

解决方案

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...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值