Skip to content

初始化 Mysql 5.7.23 schema.sql 脚本语法不兼容问题 #344

Closed

Description

@rxbyes

执行 CREATE SCHEMA diamond AUTHORIZATION diamond;

错误信息:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AUTHORIZATION diamond' at line 1, Time: 0.030000s

执行 CREATE TABLE config_info (
id bigint NOT NULL generated by default as identity,
data_id varchar(255) NOT NULL,
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
src_user varchar(128) DEFAULT NULL,
src_ip varchar(20) DEFAULT NULL,
c_desc varchar(256) DEFAULT NULL,
c_use varchar(64) DEFAULT NULL,
effect varchar(64) DEFAULT NULL,
type varchar(64) DEFAULT NULL,
c_schema LONG VARCHAR DEFAULT NULL,
constraint configinfo_id_key PRIMARY KEY (id),
constraint uk_configinfo_datagrouptenant UNIQUE (data_id,group_id,tenant_id));

错误信息:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'generated by default as identity,
data_id varchar(255) NOT NULL,
group_id va' at line 2,

执行 CREATE TABLE app_list (
id bigint NOT NULL,
app_name varchar(128) NOT NULL,
is_dynamic_collect_disabled smallint DEFAULT 0,
last_sub_info_collected_time timestamp DEFAULT '1970-01-01 08:00:00.0',
sub_info_lock_owner varchar(128),
sub_info_lock_time timestamp DEFAULT '1970-01-01 08:00:00.0',
constraint applist_id_key PRIMARY KEY (id),
constraint uk_appname UNIQUE (app_name));

错误信息:1067 - Invalid default value for 'last_sub_info_collected_time', Time: 0.034000s

Activity

  1. changed the title [-]初始化 schema.sql 脚本语法不兼容问题[/-] [+]初始化 Mysql 5.7.23 schema.sql 脚本语法不兼容问题[/+] on Nov 26, 2018
  2. hxy1991 commented on Dec 26, 2018

    @hxy1991
    Collaborator
  3. teavamc commented on Feb 2, 2021

    @teavamc

    学到了

  4. wmz831 commented on Aug 30, 2021

    @wmz831

    早期的版本中,conf里好像没有nacos-mysql.sql,这个文件从什么时候出现的?

  5. added a commit that references this issue on Aug 25, 2022
  6. added a commit that references this issue on Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions