Connection Refused Error When Connecting to MYSQL (global-db)

today suddenly i started getting mysql connection refused error. How can I access to MySQL logs?

I can not find MySQL data folder and MySQL logs for V4.

Error:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘global-db’ (111 “Connection refused”)

I can not access MySQL. Big problem.

I will be so glad for helps. Thank you.

Hi,

I generally use following debugging steps when something similar happens:

  1. Check if disk is not full. Command: df -h /
  2. Check if docker container/s are running or not. Command: docker container ls
  3. Check if running MySQL command with hostname, username and password from PHP container(or ee shell site-name.tld) is working or not.
  4. Check the logs of DB container. Command: docker logs services_global-db_1

You can use the following command to get MySQL access

# access as root:
docker-compose -f /opt/easyengine/services/docker-compose.yml exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}'

This command will give you access of MySQL shell as root user.

You can access MySQL docker container shell with following command

docker exec -it services_global-db_1 bash
1 Like

Hi,

Thank you very much.

My disk was full. I was solved it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.