How to Use MySQL from the Command Line on Ubuntu Server 20.04

Step 1 : First, we will need to connect to the MySQL server

Replace admin with a user account on the MySQL server

Step 2 : Enter the password for the admin account

Step 3 : Create a database with the following query.

Step 4 : Check all databases with a show databases query.

Step 5 : Select a database to work with

Step 6 : Create a table to store our data. Use the following query to create a table

Step 7 : You can check tables with the show tables query

Step 8 : let’s insert some data in our table.

Step 9 : The following query will select all records from the articles table

Step 10 : Retrieve the selected records from the table

Step 11 : Update the selected record

Step 12 : Delete the record, using the following command