Can not connect to mysql:8.0.30-debian and mysql:8.0.28-debian via MySQL Workbench

Dear Admins, I do apologise if this wrong forum to post this. Please remove if inappropriate. I don’t mean to do a wrong deed by the forum rule.

I can’t connect to MySQL server using mysql:8.0.30-debian and mysql:8.0.28-debian images. While I can connect to mysql:5.7.39-debian.

My environments

  1. Windows 10 Pro – version 10.0.19044 build 19044.
  2. Docker client – version 20.10.17.
  3. Docker Desktop – 4.11.0 (83626). Engine version 20.10.17.
  4. MySQL Workbench – version 6.3.0 build 12092614 (64 bits) community.

Connect to MySQL Workbench with:

Host: localhost
Port: 3306
User: root
Password: pcb.2176310315865259


E:\>docker run --name mysql-docker -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pcb.2176310315865259 --rm mysql:8.0.30-debian

Failed. Error message: SSL connection error: unknown error number.


E:\>docker run --name mysql-docker -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pcb.2176310315865259 --rm mysql:8.0.28-debian

Failed. Error message: SSL connection error: unknown error number.


E:\>docker run --name mysql-docker -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pcb.2176310315865259 --rm mysql:5.7.39-debian

This mysql:5.7.39-debian works.

I don’t know the default settings of MySQL 8.0, maybe the SSL is enabled by default, maybe you use SSL for all of your connections, but it seems to me that your client (MySQL WorkBench) or the driver is not compatible with new new server version, or you need some certificate settings. Either way I think it is not with Docker specifically. Can you try to connect any MySQL 8.0 server installed on a host and not in containers? That could confirm my theory. You can also search for the error message and see how other people dealt with this issue without Docker or ask on the MySQL forum

Good morning rimelek,

Thank you for your response. I appreciate that. I will look into your suggestions a bit later.

If I find anything, I will report back.

Thank you again and best regards,


This was my bad… It did not occur to me the version of MySQL WorkBench was a factor, I upgraded it to mysql-workbench-community-8.0.30-winx64.msi and I can connect to mysql:8.0.30-debian with no problem.

( I did download mysql-workbench-community-8.0.28-winx64.msi back in February 2022. )

When I ran my SQL scripts via batch file to create a new database, a new user and restore back up from MySQL 5.5, MySQL 8.0.30 raised the following error:

ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.

I chose to modify:


Added the following section:


I had to install vim via interactive bash mode to edit the config file.

Afterward, while to container was still running, I committed to another image, and then save this image to a local drive as a *.tar file.

After shutdown the running container, I removed the existing mysql:8.0.30-debian image, loaded the image from the *.tar file, and run this image: this way I can retain vim and the updated /etc/mysql/conf.d/mysql.cnf.

I run it as:

docker run --name mysql-docker -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pcb.2176310315865259 --rm --mount source=mysqlvol,target=/var/lib/mysql mysql:8.0.30-debian-plus

Where mysql:8.0.30-debian-plus is the image updated from the base mysql:8.0.30-debian.

I now have a fully functional database running, I can connect to it locally using any client tool, and my application also runs against this new database.

Thank you.

Why don’t you just create a Docker file and a custom mysql.cnf and build your own image? exporting and loading containers back is not a good idea since you can’t log the changes and you will never be able to update the base image without interactive file editing with just running the cokder build command.