dashboard服务启动不了,报错:连接mysql创建TABLE语句错误,该如何解决

[root@localhost ~]# cat /usr/local/nebula-dashboard-ent/logs/webserver.log
{"@timestamp":"2023-02-21T22:12:44.854-05:00","caller":"license/license.go:37","content":"license validation warning Your license will expire soon. The service cannot be used after the expiration date. expired date is '2023-03-22T15:59:59.000Z', please contact our support team via inquiry@vesoft.com to buy a new license or renewal your license","level":"info"}
{"@timestamp":"2023-02-21T22:12:44.861-05:00","caller":"db/db.go:63","content":"database connect success","level":"info"}
{"@timestamp":"2023-02-21T22:12:44.861-05:00","caller":"model/model.go:84","content":"auto migrate db tables...","level":"info"}

2023/02/21 22:12:44 github.com/vesoft-inc/nebula-dashboard-ent/backend/api/dashboard/internal/model/model.go:86 Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON,PRIMARY KEY (`id`),INDEX `idx_operation_records_deleted_at` (`deleted_at`))' at line 1
[0.154ms] [rows:0] CREATE TABLE `operation_records` (`id` bigint AUTO_INCREMENT,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`cluster_name` varchar(128) NOT NULL,`cluster_id` varchar(128) NOT NULL,`username` varchar(128) NOT NULL,`operation` varchar(128) NOT NULL,`info` JSON,PRIMARY KEY (`id`),INDEX `idx_operation_records_deleted_at` (`deleted_at`))
2023/02/21 22:12:44 init database tables failed Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON,PRIMARY KEY (`id`),INDEX `idx_operation_records_deleted_at` (`deleted_at`))' at line 1
1 个赞

想问下,数据库是选择的mysql还是sqlite,如果没有特殊改过配置,默认用的是sqlite,看报错,你这边连接的是 mariaDB,估计是这个db和mysql有点不兼容

是否可以用默认的sqlite去做存储。
当前问题,ChatGPT是这么解释的:

我选择的是MySQL,更改了默认

选择了 MySQL 还是报错对么?

是的,我后来选择默认的sqlite就没事了

使用sqlite确实没出错了,只是使用mariadb还是会出错

你好,我用docker起了一个10.11.2版本的mariadb,可以正常使用,没有复现上面的问题。请问你用的mariadb版本是?有做什么额外的配置吗

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。