- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we drop an existing database by using mysqladmin?
We would need special privileges to create or to delete a MySQL database. Following is the syntax of dropping a database using mysqladmin binary −
Syntax
[root@host]# mysqladmin -u root -p drop db_name Enter password:******
Here, db_name is the name of the database we want to delete.
Example
Following is an example to delete a database named TUTORIALS −
[root@host]# mysqladmin -u root -p drop TUTORIALS Enter password:******
The above statement will give you a warning and it will confirm if you really want to delete this database or not.
Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the 'TUTORIALS' database [y/N] y Database "TUTORIALS" dropped
Advertisements