loading

Blog

 Home / Blog / How to create database using CLI in Ubuntu 20.04 for your dedicated server

How to create database using CLI in Ubuntu 20.04 for your dedicated server

Step 1: SSH into your server as root of your dedicated server.

Step 2: Log into MySQL
Step 3: Create a new database by running the following command and specifying the name of the database:

CREATE DATABASE db_name;

NOTE: Be sure to modify db_name with the actual name you would like to give the database.

Example:
MariaDB [(none)]> CREATE DATABASE webq_yahoo;

To view the database you have created, use this command.

MariaDB [(none)]> show databases;

Congratulations! Now, you know how to create a MySQL database from the command line for your dedicated server.

Conclusion

After this tutorial, you now know how to create the databases for your dedicated server. The command is simple to use and works together with other MySQL commands.

Comments
Leave a Comment
Please login

Learn more about Web88 CMS System Go!