Skip to content

Files

Latest commit

f0658dc · Jun 28, 2024

History

History

mysql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 28, 2024
Jun 28, 2024
Jun 7, 2024

ReadMe.md

taskset_mysql_databases

Auto generated ReadMe. Number of tasks: 6

Mac

hub.docker.com » starting mysql locally

Start the MySQL database locally with the following command:

Start the MySQL database in ephemeral mode

# Start the MySQL database locally, in ephemeral mode
docker run --rm -it --name mysql_lts -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:lts
# Execute a bash shell in the container
docker exec -it mysql_lts bash

Start the MySQL database in persistent mode

# Start the MySQL database locally in persistent mode
docker run --name mysql_lts -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -v $(pwd)/mysql_data:/var/lib/mysql -d mysql:lts

# Execute a bash shell in the container
docker exec -it mysql_lts bash

Connect to the MySQL database

# Connect to the MySQL database in the container
mysql -hlocalhost -uroot -psecret
Task Description
task_001 task_001_connecting_to_db
task_002 task_002_mysqldump
task_003 task_003_managing_databases
task_004 task_004_managing_user
task_005 task_005_set_transaction_isolation_levels
task_006 task_006_managing_tables