Bug #2322 drop database database;
Submitted: 8 Jan 2004 8:23 Modified: 8 Jan 2004 8:33
Reporter: murugesan dinesh Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Websites: bugs.mysql.com Severity:S1 (Critical)
Version:4.0.15 OS:Any (All)
Assigned to: Dean Ellis CPU Architecture:Any

[8 Jan 2004 8:23] murugesan dinesh
Description:
mysql> drop database database;
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 'database' at line 1

How to repeat:
Hello,
   Just created a database with 

$ mysqladmin create database

But unable to drop the database

mysql prompt $ drop database "database"
mysql prompt $ drop database 'database'
mysql prompt $ drop database database

Tried all these things ( including mysqladmin) but not able to drop it.

Regards,
Murugesan
[8 Jan 2004 8:33] Dean Ellis
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

A list of reserved words is available online at :

http://www.mysql.com/doc/en/Reserved_words.html

You would have to escape such words like `this`.
[20 Feb 2011 0:54] André Lopes
You can use this command either:

mysqladmin -h hostname -u root -p drop database