Home > Database > Mysql Tutorial > How can we delete existing database using mysqladmin?

How can we delete existing database using mysqladmin?

王林
Release: 2023-09-09 08:09:17
forward
968 people have browsed it

我们如何使用 mysqladmin 删除现有数据库?

We need special permissions to create or delete MySQL databases. The following is the syntax to delete a database using mysqladmin binary -

Syntax

[root@host]# mysqladmin -u root -p drop db_name
Enter password:******
Copy after login

Here, db_name is the name of the database we want to delete.

Example

The following is an example of deleting a database named TUTORIALS:

[root@host]# mysqladmin -u root -p drop TUTORIALS
Enter password:******
Copy after login

The above statement will give you a warning and confirm whether you really want to delete this database.

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
Copy after login

The above is the detailed content of How can we delete existing database using mysqladmin?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template