MySQL/Introduction

Readings

 * MySQL

MySQL Environment
Establish a MySQL environment using one of the following:
 * Docker Playground
 * MySQL in Docker
 * Install MySQL

Docker Playground
Docker Playground is a free online Docker environment. It requires no installation or configuration.
 * 1) Use Play with Docker. Create an account and/or log in.
 * 2) Start an interactive session and add a new instance.
 * 3) In the terminal window, enter the following command:
 * 4) To connect to the mysql-server:
 * 5) * Enter   for the root password when prompted.
 * 1) * Enter   for the root password when prompted.
 * 1) * Enter   for the root password when prompted.

MySQL in Docker
You can use your own Docker environment to run MySQL.
 * 1) Install Docker Desktop or the Docker Engine.
 * 2) In a terminal window, enter the following commands:
 * 3) To connect to the mysql-server:
 * 4) * Enter   for the root password when prompted.
 * 1) * Enter   for the root password when prompted.
 * 1) * Enter   for the root password when prompted.

Install MySQL
Install MySQL on your own system.
 * 1) Review MySQL: Installation Guide
 * 2) Download and install MySQL.
 * 3) Use the following terminal command to access the MySQL command interface:

Create a Database

 * 1) Use the following SQL command to create a temperature database:
 * 2) Use the following SQL command to show existing databases:
 * 3) Use the following SQL command to open the Temperature database:
 * 4) Use the following SQL command to create a Countries table:
 * 5) Use the following SQL command to show existing tables in the database:
 * 6) Use the following SQL command to insert records into the Countries table:

Query an MySQL Database

 * 1) Use the following SQL command to query the Countries table:

Insert a Record

 * 1) Use the following SQL command to insert a record into the Countries table:
 * 2) Use the following SQL command to display the inserted record:

Update a Record

 * 1) Use the following SQL command to update a record in the Countries table:
 * 2) Use the following SQL command to display the updated record:

Delete a Record

 * 1) Use the following SQL command to delete a record from the Countries table:
 * 2) Use the following SQL command to display the remaining records:

Delete All Records

 * 1) Use the following SQL command to delete all records from the Countries table:
 * 2) Use the following SQL command to display the empty table:

Remove a Table

 * 1) Use the following SQL command to remove the Countries table:
 * 2) Use the following SQL command to verify that the table was removed:

Drop a Database

 * 1) Use the following SQL command to show existing databases:
 * 2) Use the following SQL command to remove the temperature database:
 * 3) Use the following SQL command to show existing databases: