Description:
Started docker mysql, clicked on a saved connection, and workbench crashed immediately.
Although container starts with issue, workbench should not have crashed, a nice error will be nice.
How to repeat:
1. docker-compose up from vscode
*****************
version: '3.4'
services:
mysql:
image: mysql/mysql-server:latest
restart: always
environment:
# MYSQL_DATABASE: 'collaborator'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'dbuser'
# You can use whatever password you like
MYSQL_PASSWORD: 'test'
# Password for root access
MYSQL_ROOT_PASSWORD: 'test'
ports:
# <Port exposed> : <MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
# - mysql-data:/var/lib/mysql
- type: bind
source: /opt/homebrew/etc/my.cnf
target: /etc/my.cnf
- type: bind
source: /Users/karenlaw/data/mysql
target: /var/lib/mysql
#volumes:
# mysql-data:
******************************
Here is the output in the terminal
********************
* Executing task: docker-compose -f "docker-compose.yml" up -d --build
WARN[0000] /Users/karenlaw/dev/collaborator/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 1/1
✔ Network collaborator_default Created 0.1s
⠋ Container collaborator-mysql-1 Creating 0.0s
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /opt/homebrew/etc/my.cnf
* The terminal process "/bin/bash '-l', '-c', 'docker-compose -f "docker-compose.yml" up -d --build'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
*************************
2. Go to workbench, doubled clicked on saved connection.
the connection username is dbuser, everything else is the default.
3. workbench window disappears
Suggested fix:
An error message informing the user something is wrong