1. 修改ini中的sql_mode 用/bin/mysqld --defaults-file=pangu.cnf --user=mysql启动后,select @@global.sql_mode; 并未生效。 2. 创建表的语句中 default后加UUID或者UNIX_TIMESTAMP会报语法错误,测试sql: CREATE TABLE `kb_attck` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `time_created` bigint(20) NOT NULL DEFAULT (UNIX_TIMESTAMP(current_timestamp())*1000) COMMENT '创建时间', `time_updated` bigint(20) NOT NULL DEFAULT (UNIX_TIMESTAMP(current_timestamp()) * 1000) COMMENT '更新时间', `uuid` varchar(64) NOT NULL DEFAULT UUID(), PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=14014 DEFAULT CHARSET=utf8mb4 COMMENT='ATT&CK表'; 错误信息:[Err] 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 '(UNIX_TIMESTAMP(current_timestamp())*1000) COMMENT '创建时间', `time_upd' at line 3 |
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com