为了能够用大写字母创建表,我不得不修改 ProgramData\MySQL\MySQL Server 5.7
中的 my.ini
文件,你添加了 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` (
)
最佳答案
您不能创建没有列的表格 - 您需要在括号之间添加一些内容。例如:
CREATE TABLE `toys`.`new_table` (
id INT -- just for example
);
关于MySql - 更改 my.ini 后无法创建新表 (windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35785219/