How To Use Mysql / MariaDB From Console?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-use-mysql-mariadb-from-console/
PINTEREST
PINTEREST
INSTAGRAM

Mysql is one of the most popular databases in IT world. It is open source and have rich features were paid databases provides. MariaDB is fork of the MySQL and very similar to it. We have already looked how to login and do simple steps in this post

Getting Help

We can list mysql tool help options like below.

Connect to MySQL/MariaDB

We can connect to the database cli tool named mysql by providing username and password.

LEARN MORE  How To Access MySQL Database From Java Applications?

Show MySQL/MariaDB Databases

There is default databases like information_schema,mysql,… and user added databases. We can list them with show command.

Select Database To Use Query

To query a database by default we should select database

Show Tables

show command can be used to show tables too;

Create Table

We need to create a table we will provide table name and field names with their types. We will create a table named Persons with fields PersoneID type of integer, …

LEARN MORE  How To Create Database and Table In MySQL and MariaDB

Deleting/Dropping Table

We will delete table completely not just the row. Drop Table is the command with the table name.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-use-mysql-mariadb-from-console/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)