Sqlstate hy000 2006 mysql server has gone away docker
i have a little problem with mysql server. i created my docker-compose.yml, but when i want to access to phpMyAdmin (localhost:8080), an error message appeared sais that: "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. Please check the values of host, username and password in the configuration and make sure they match the information provided by the MySQL server administrator". Show Here is my docker-compose file and thanks for helping me
asked Sep 7, 2019 at 13:25
Seems like you have a typo in
You configured port mapping so that container is reachable at Side note: you do not need to expose port for database at all - other containers will communicate with it using Docker's virtual network and for local access you can use answered Sep 7, 2019 at 14:10
Tomasz KapłońskiTomasz Kapłoński 1,2502 gold badges20 silver badges45 bronze badges while it appears there is a typo for the port with this post I want to point out that it's important to make sure that your user has access 'TO' and 'FROM' the appropriate IP. This is an (wide open -adjust as needed) example for updating the access domain when running adminer / phpadmin via docker:
p.s. I'm adding this answer here because I also landed on this page with the same error. answered Nov 21, 2019 at 0:34
I solved my problem with this command:
answered Aug 22 at 17:50
Hi there, I have been trying to move from a Digital Ocean managed db to a in servier Docker one, but I have been dealing with this error since yesterday. I have exported the database using phpMyAdmin successfully, and when I try to import it I get the error
Here it the image of the error: https://s3.marroquin.dev/mysql/error.jpg I am trying to restore a 11.9 mb wordpress database and getting the error, but I was successfull to restore another wordpress database of 4.70 mb Here is the
Although I don't think the size of the database is the problem because I tried restoring each table one by one and Here is the log of docker run -it --rm mysql:8 --verbose --help with all arguments I can use How do I fix Sqlstate hy000 2006 MySQL server has gone away?The MySQL server has gone away (error 2006) has two main causes and solutions: Server timed out and closed the connection. To fix, check that wait_timeout mysql variable in your my. cnf configuration file is large enough, eg wait_timeout = 28800.
Why MySQL server has gone away?The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection. In this case, you normally get one of the following error codes (which one you get is operating system-dependent). The client couldn't send a question to the server.
How do I fix MySQL connection error?Some permanent solutions are:. Determine what is wrong with your DNS server and fix it.. Specify IP addresses rather than host names in the MySQL grant tables.. Put an entry for the client machine name in /etc/hosts on Unix or \windows\hosts on Windows.. Start mysqld with the skip_name_resolve system variable enabled.. Can't connect to MySQL server timed out?A Connection Timed Out error occurs when the database's firewall won't allow you to connect to the database from your local machine or resource. If you are getting this error, check that you have added the machine or resource you are connecting from to the database's list of trusted sources.
|