Knowledge Base
MilesWeb / Database

Steps to View MariaDB databases in SSH

Approx. read time : 2 min

While working with MariaDB to manage databases in cPanel, the interfaces will be similar to that with MySQL. MariaDB is just made as a drop-in replacement for MySQL. In this tutorial we will see some commands using SSH for accessing the database and viewing it.

Steps to View MariaDB databases in SSH

1. Login to SSH.

2. Using the database user assigned to the database you want to view, login to MySQL (MariaDB). When the below command is executed, you will need to enter the MySQL user’s password.

If you are able to login successfully, you will see the below screen. Note that you see that you’re using MariaDB at this point.

3. You may find more than one database assigned to the user that you used to login to the mysql command line. So, select the database that will be used.

A list of databases that are assigned to the user name that you are using will get displayed.

4. Here you need to select your database. After selecting the database, your prompt will change to choose the database you have selected.

5. Many commands are used in displaying the contents of a database. But here we will see just a few of them:
With the below command, a list of the tables from the database will get displayed.

For seeing all the records in a specific table, use the below command:

For seeing all the database table field names, configuration and type of a certain table, use the below command:

Note: For checking database specifics, it is needed to have a selected database with the USE command.

Congratulations you have learned to view a database using the command line in MariaDB.

Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.
Need help? We’re always here for you.