InMotion Hosting Support Center

When you are working with MariaDB to manage databases in cPanel, you will be working with the same interfaces as you did when working with MySQL. MariaDB is made to be a drop-in replacement for MySQL. In this tutorial, we will be showing a few commands using SSH to get to the database and view it.

  1. Login to SSH.
  2. Login to MySQL (MariaDB) using the database user that you know is assigned to the database you're trying to view. the following command:

    MariaDB [(none)]> mysql -u username -p

    You will notice the following screen if you successfully login. Note that you can see that you're using MariaDB at this point.

    Login to the mysql command line
  3. There may be more than one database assigned to the user that you used to login to the mysql command line. Therefore, you need to select the database that will be used.

    MariaDB [(none)]> show databases;

    You will see a list of databases that are assigned to the user name that you are using.

    show the databases assigned to the user
  4. At this point you need to select your database. Note that when you have selected the database your prompt will change to choose the database you have selected.

    MariaDB [(none)]> use databasename;

    Select the database you want to see
  5. There are many commands involved in displaying the contents of a database. We're going to be showing just a few of them:

    This will show a list of the tables from the database

    MariaDB [arnel_test1]> show tables;

    Select the database you want to see

    Show all the records in a specific table:

    MariaDB [arnel_test1]> select * from databasetablename;

    Select records from the database

    In order to show all of the database table field names, type, and configuration of a certain table. Note that in order to view database specifics, you will need to have selected a database with the USE command.

    MariaDB [arnel_test1]> describe databasetablename;

    Describe database

Congratulations you now know how to view a database using the command line in MariaDB.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!