-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mysql: Add more MySQL content (#658)
- Loading branch information
Showing
4 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
# What is SQL? | ||
## 1. What is MySQL | ||
|
||
- TODO | ||
### Overview | ||
|
||
## 1. Where to learn? | ||
- MySQL, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. | ||
|
||
### Official website documentation of MySQL | ||
|
||
- Visit https://dev.mysql.com/doc/ | ||
|
||
## 2. Installation | ||
|
||
### How to install MySQL? | ||
|
||
- https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/ | ||
|
||
## 3. Basics of MySQL | ||
|
||
### Getting started with MySQL | ||
|
||
- https://dev.mysql.com/doc/mysql-getting-started/en/ | ||
|
||
### MySQL Helloword ⭐ | ||
|
||
- Visit [mysql-basics](./mysql-basics.md) | ||
|
||
## 4. Beyond the Basics | ||
|
||
### Exploring Advanced Examples | ||
|
||
- Checkout [mysql-advanced](./mysql-advanced.md) | ||
|
||
## 5. More | ||
|
||
### CS50x SQL | ||
|
||
- [CS50x 2023 - Lecture 7 - SQL](https://www.youtube.com/live/zrCLRC3Ci1c?si=yCsB6cSRY5FqyOXd) | ||
|
||
### Recommended Books | ||
|
||
- None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# More MySQL hands-on | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# MySQL basic hands-on | ||
|
||
This hands-on will: | ||
|
||
- Provisions a mysql instance with docker | ||
- Creates a database named `sqldemodb`, a table named `users` with the specified columns, and shows how to verify the database and table creation. | ||
|
||
## Run and explore sql in docker container | ||
|
||
```bash | ||
docker run --name demo-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest | ||
|
||
docker exec -it demo-mysql bash | ||
# You now in the `bash-5.1#` container terminal | ||
|
||
# Connect to SQL | ||
mysql -uroot -p | ||
|
||
# Creating new DB | ||
CREATE DATABASE sqldemodb; | ||
|
||
# Using the Database | ||
USE sqldemodb; | ||
|
||
|
||
# Creating a New Table | ||
CREATE TABLE users ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
name VARCHAR(100) NOT NULL, | ||
email VARCHAR(100) NOT NULL | ||
); | ||
|
||
# Verifying the Creation | ||
SHOW DATABASES; | ||
SHOW TABLES; | ||
DESCRIBE users; | ||
``` |