mysqldatabasesyntaxdrop-database

How to DROP DATABASE named "/"


There is this database created automatically with a CMS. the database name is "/" without quotes. and when trying do delete it, this shows up.

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, for debian-linux-gnu (x86_64) using EditLine wrapper

Thank you for your help.


Solution

  • You need backticks:

    DROP DATABASE `/`;