MySQL MariaDB

MariaDB List Databases

While using any particular database management system (DBMS), you create multiple databases. At times, you might even forget the names of the databases that you have created in the past. However, whenever you wish to access a particular database, you should at least know its name. MariaDB provides you a way through which you can list down all the databases that you have created using this DBMS. In this guide, we will share this method with you.

How to List the Databases in MariaDB?

For learning the method of listing down all the databases in MariaDB, you will have to go through the following steps:

Step # 1: Check if the MariaDB Server is running on your System or not:

First, you need to check if the MariaDB server is running on your system or not. For that, you have to execute the command shown below:

$ sudo systemctl status mariadb

The following status implies that the MariaDB server is up and running on our system:

Step # 2: Access the MariaDB Console:

Now, you need to access the MariaDB console by running the command shown below:

$ sudo mysql –u root –p

The following image shows the MariaDB console:

Step # 3: List Down all the MariaDB Databases:

For listing down the MariaDB databases, you have to run the command shown below:

> show databases;

All the MariaDB databases of our system are shown in the following image:

Conclusion

This article discussed the method of listing all the databases of MariaDB on the console. By using this method, you can instantly find out the names of all the databases that you have created so far using this DBMS.

About the author

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.