Cannot connect from php container to mysql server.
I have a problem on my development server, which is blocking me to use Docker containers
to connect to mysql servers on my host or in a mysql container. I always get the same error
(in a host and and container mysql server)
`ERROR 2026 (HY000): TLS/SSL error: self-signed certificate in certificate chain`
So my conclusion is that there is something wrong in the php Docker file.
My docker configuration used to work for months and it does not work.
I was wondering if my Docker has been corrupted so I installed Docker to an other
computer but I still get the error.
How to make a working solution on my development server so that I connect to mysql server (host or container)?
Here is my docker file as simple as possible and how I run it.
Host
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Docker version 28.4.0
Dockerfile
# build image
docker image build -t img_docker_container_mysql_connection -f Dockerfile .
#run
docker run --name docker_container_mysql_connection \
--privileged=true -v ${PWD/}/var/www img_docker_container_mysql_connection
FROM php:8.2-fpm
RUN apt-get update \
&& apt-get install -y default-mysql-client
# 192.168.18.3 is is the internal IP of my host
CMD [ "mysql", "-h192.168.18.3" ]
I am not an expert with mysql certgicates, but I have tried with the links below, but no helpā¦