phpmyadmin / docker

Docker container for phpMyAdmin
https://hub.docker.com/_/phpmyadmin
GNU General Public License v3.0
675 stars 455 forks source link

mysqli::real_connect(): (HY000/2002): No such file or directory #431

Closed pp2amd6 closed 11 months ago

pp2amd6 commented 11 months ago

I'm install phpmyadmin with docker but when I try to login i get error mysqli::real_connect(): (HY000/2002): No such file or directory

image

I use docker-compose.yml config from phpmyadmin DockerHUB page

OS: Win 10 Docker: Docker Desktop 4.26.1 (131620)

williamdes commented 11 months ago

Hi, Can you please share the full docker composer file here?

williamdes commented 11 months ago

From the screenshot I see you are doing something impossible, trying to connect to localhost. Localhost is the phpMyAdmin container, not your computer.

You can fix this by using docker network mode host : network_mode: host

This is very similar to https://github.com/phpmyadmin/docker/issues/429

Or mount a socket file to the local database, this will probably work well

pp2amd6 commented 11 months ago

@williamdes sorry my fault I forgot declare network. Now I set network and all works fine

williamdes commented 11 months ago

Gald to know it works fine now 🎉