Get the App
SLTechnology News&Howtos  ›  Database  › 

The method of creating Database by mysql

Shulou Source: shulou.com Published: 2022-06-01 18:11:20 10月19日 Update

I don't know if you have any understanding of the previous articles on how to create a database like mysql. Today, I'm here to tell you a little bit about it. If you are interested, let's take a look at the text. I believe you will gain something after reading the method of creating a database in mysql.

Use MySQL to create the database:

Create using the command line

After logging in to the MySQL service, we can use the create command to create the database. The syntax is as follows:

CREATE DATABASE database name

The following command simply demonstrates the process of creating a database, named RUNOOB:

[root@host] # mysql-u root-p Enter password:* # log in to terminal mysql > create DATABASE test

Create a database using mysqladmin

With normal users, you may need specific permissions to create or delete MySQL databases.

So we use the root user to log in, and the root user has the highest privileges, so we can use the mysql mysqladmin command to create the database.

The following command simply demonstrates the process of creating a database, named test:

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

The MySQL database test is created after the above command is executed successfully.

After reading this article on how to create a database in mysql, what do you think? If you want to know more about it, you can continue to follow our industry information section.

Tags: Data database commands methods users permissions procedures presentations login normal maximum success creative interest backward articles more sections text articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia vpn macOS Redmi