【问题标题】:MySql - unable to create new tables after changing my.ini (windows)MySql - 更改 my.ini 后无法创建新表(windows)
【发布时间】:2016-06-17 13:10:25
【问题描述】:

为了能够创建带有大写字母的表格,我不得不修改ProgramData\MySQL\MySQL Server 5.7 中的my.ini 文件,U 在文件末尾添加了lower_case_table_names = 2,就像我关闭时建议的here 一样MySQL服务器并重新启动它无法创建任何新表,所以我删除了我添加的行,再次重新启动服务器,我一直有这个错误

Operation failed: There was an error while applying the SQL script to the database.
Executing:
CREATE TABLE `toys`.`new_table` (
);

ERROR 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 ')' at line 2
SQL Statement:
CREATE TABLE `toys`.`new_table` (
)

【问题讨论】:

    标签: mysql syntax-error ddl create-table


    【解决方案1】:

    您无法创建没有列的表格 - 您需要在括号之间添加一些内容。例如:

    CREATE TABLE `toys`.`new_table` (
        id INT -- just for example
    );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-25
      • 2021-12-30
      • 2011-11-25
      • 2014-01-23
      • 2012-08-12
      • 1970-01-01
      • 2013-10-31
      相关资源
      最近更新 更多