Skip to content

Commit

Permalink
doc: mysql docker installation
Browse files Browse the repository at this point in the history
  • Loading branch information
leepc12 committed Nov 15, 2019
1 parent 76018a1 commit 7a9c938
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ In order to use call-caching, choose one of the following metadata database type

## MySQL database

We provide [shell scripts](bin/run_mysql_server_docker.sh) to run a MySQL server in a container with docker/singularity. Once you have a running MySQL server, define MySQL's port in Caper's conf file `~/.caper/default.conf`.
We provide [shell scripts](bin/run_mysql_server_docker.sh) to run a MySQL server in a container with docker/singularity. Once you have a running MySQL server, add the followings to Caper's conf file `~/.caper/default.conf`. You may need to change the port number if it conflicts.

```
db=mysql
Expand All @@ -225,6 +225,20 @@ mysql-db-port=3306

1) docker

Ask your admin to add you to the `docker` group or if you are root then install Docker, create a group `docker` and add yourself to the group `docker`.

```bash
$ sudo apt-get install docker.io
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
```

**RE-LOGIN** and check if Docker `hello-world` works.

```bash
$ docker run hello-world
```

Run the following command line. `PORT` and `CONTAINER_NAME` are optional. MySQL server will run in background.

```bash
Expand All @@ -243,9 +257,13 @@ mysql-db-port=3306
docker: Error response from daemon: Conflict. The container name "/mysql_cromwell" is already in use by container 0584ec7affed0555a4ecbd2ed86a345c542b3c60993960408e72e6ea803cb97e. You have to remove (or rename) that container to be able to reuse that name..
```

To stop/kill a running MySQL server,
Check if MySQL server is running.
```bash
$ docker ps # find your MySQL docker container
```

To stop/kill a running MySQL server,
```bash
$ docker stop [CONTAINER_NAME] # you can also use a container ID found in the above cmd
```

Expand Down

0 comments on commit 7a9c938

Please sign in to comment.