问题
I am running local MySQL
instance version of 5.7.23
in Ubuntu-18-04
. The DB is already having some tables having JSON fields to store JSON
data. They working fine with insert, update and delete operations.
The issue comes when try to modify an existing table to have a new field to store JSON data. MySQL-Workbench
is giving an error saying
Type not supported
The JSON data is not available before MySQL 5.7.8. In order to use it, first set the version for your model to 5.7.8 or higher
Following screen shots shows my local environment information.
The error:
MySQL server info:
MySQL Workbench info:
回答1:
I was able to figure the issue. The default version set for Modeling MySQL was set as 5.6.30. Changed it to 5.7.8 and works the table schema modification.
Go to Edit
-> Preferences...
in MySQL Workbench
Refer the below screens:
Before:
After:
回答2:
Preference
doesn't work for me. I use osx with workbench version 8.0.11.Model
in top bar menu -> Model Options
-> MySQL
then change the version as Shantha's answer works for me.
Previous version of MySQLWorkbench (6.3.10) has better error message for this...
来源:https://stackoverflow.com/questions/52480055/type-not-supported-the-json-data-is-not-available-before-mysql-5-7-8