Mysql/Mariadb using terminal

Logging in to your mysql/mariadb instance in your terminal

mysql -uroot -p

Where “root” is the user name and -p will prompt you for a password. Enter the password and you will see the terminal like this below.

show databases;

Once you are in the mysql/mariadb you can view the list of databases in your installation. Do take note that semicolon is a delimiter.

use [databasename];
show tables;

To navigate to the desired database, the command input the command “use” followed by the database name. Once you’ve done this you can then view the list of tables by doing the command “show tables”.

Learn more mysql/mariadb in this link.

6 thoughts on “Mysql/Mariadb using terminal”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
?>