Skip to content

Commit 445636f

Browse files
committed
add 13 terminal commands
1 parent b202ad7 commit 445636f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

13-mysql/terminal-commands.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Install Docker www.docker.com
2+
docker run -d --name test-mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=test mysql
3+
4+
# now you can stop, start & remove the DB by name
5+
docker stop test-mysql
6+
docker start test-mysql
7+
docker rm test-mysql
8+
9+
# you can also have multiple databases
10+
# you just can't run more than one at once on the same port
11+
docker run -d --name test-mysql2 -p 3307:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=test mysql
12+
# test-mysql2 is now running on port 3307
13+
14+
docker ps
15+
16+
# connect using sequel pro (mac) or MySQL Workbench (mac/pc)
17+
18+
19+
# other ways to install mysql
20+
# go to mysql.com and use the installer
21+
# on Mac, use homebrew (brew.sh): brew install mysql
22+
# I also recommend using brew services to control, start, stop mysql server

0 commit comments

Comments
 (0)