删除数据库报错ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds t

删除数据库报错ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds t

报错现象

ERROR 1064 (42000): 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 '-bk_itsm--1' at line 1

原因

出现这个错误是因为数据库名称 bkapp-bk_itsm–1 包含了不允许的字符(如连字符-)。根据 MySQL 文档,数据库名、表名和列名等标识符应该只包含字母、数字、下划线、美元符号和 Unicode 字符。在这种情况下,您可以使用反引号(`)将数据库名括起来,以便正确解析。

解决方案

请尝试使用以下命令删除数据库:

DROP DATABASE `bkapp-bk_itsm--1`;
转载请说明出处内容投诉
CSS教程_站长资源网 » 删除数据库报错ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds t

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买