File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments