Home  >  Article  >  Database  >  How do we create a new database using mysqladmin?

How do we create a new database using mysqladmin?

王林
王林forward
2023-09-13 08:29:091259browse

How do we create a new database using mysqladmin?

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

Syntax

[root@host]# mysqladmin -u root -p create db_name
Enter password:******

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

Example

The following is a tutorial to create a database named −

[root@host]# mysqladmin -u root -p create TUTORIALS
Enter password:******

The above query will create a MySQL database named TUTORIALS.

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

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete