如何删除名为“/”的数据库
How to DROP DATABASE named "/"
这个数据库是用 CMS 自动创建的。数据库名称是不带引号的“/”。当尝试删除它时,出现了这个。
mysql> DROP DATABASE /;
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 '/' at line 1
mysql Ver 14.14 Distrib 5.6.24,用于 debian-linux-gnu (x86_64) 使用 EditLine wrapper
感谢您的帮助。
您需要反引号:
DROP DATABASE `/`;
这个数据库是用 CMS 自动创建的。数据库名称是不带引号的“/”。当尝试删除它时,出现了这个。
mysql> DROP DATABASE /;
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 '/' at line 1
mysql Ver 14.14 Distrib 5.6.24,用于 debian-linux-gnu (x86_64) 使用 EditLine wrapper
感谢您的帮助。
您需要反引号:
DROP DATABASE `/`;