gpt4 book ai didi

mysql - 从模式重新创建 mysql 数据库

转载 作者:行者123 更新时间:2023-11-29 18:30:35 25 4
gpt4 key购买 nike

我尝试从 schema.sql 文件重新创建数据库,但在第 22 行收到错误 ERROR 1193 (HY000):未知的系统变量“storage_engine”

这是 schema.sql 文件。

SET SESSION storage_engine = "InnoDB";
SET SESSION time_zone = "+0:00";
ALTER DATABASE CHARACTER SET "utf8";

DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
author_id INT NOT NULL REFERENCES authors(id),
slug VARCHAR(100) NOT NULL UNIQUE,
title VARCHAR(512) NOT NULL,
markdown MEDIUMTEXT NOT NULL,
html MEDIUMTEXT NOT NULL,
published DATETIME NOT NULL,
updated TIMESTAMP NOT NULL,
KEY (published)
);

DROP TABLE IF EXISTS authors;
CREATE TABLE authors (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(100) NOT NULL UNIQUE,
name VARCHAR(100) NOT NULL,
hashed_password VARCHAR(100) NOT NULL
);

可能是什么问题?

最佳答案

根据https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_storage_engine

This variable is deprecated as of MySQL 5.5.3. Use default_storage_engine instead.

关于mysql - 从模式重新创建 mysql 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45724011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com