docker-joomla icon indicating copy to clipboard operation
docker-joomla copied to clipboard

MySQL Connection Error: Access Denied

Open einue opened this issue 4 years ago • 1 comments

When running docker-compose up, I get the following error MySQL Connection Error: (1045) Access denied for user 'root'@'192.168.176.3' (using password: YES)

My docker-compose file looks like: `version: '3.7'

services: joomla: image: joomla restart: always depends_on: - joomladb links: - joomladb:mysql ports: - 8080:80 volumes: - ../:/var/www/html networks: - joomla-nw environment: JOOMLA_DB_HOST: joomladb JOOMLA_DB_NAME: joomla JOOMLA_DB_USER: root JOOMLA_DB_PASSWORD: test

joomladb: image: mysql:5.6 ports: - 3306:3306 restart: always volumes: - ./data:/var/lib/mysql networks: - joomla-nw environment: MYSQL_DATABASE: joomla MYSQL_ROOT_PASSWORD: test MYSQL_USER: testuser MYSQL_PASSWORD: user

networks: joomla-nw:`

If I change the JOOMLA_DB_PASSWORD to "example" it works. Is there anything wrong in the docker-image with the default settings?

einue avatar Jul 11 '20 10:07 einue

Only a guess if you use root as user you may have to use MYSQL_ENV_MYSQL_ROOT_PASSWORD as variable name.

HLeithner avatar Aug 09 '20 08:08 HLeithner

By design, and for security the name root is not allowed.

Llewellynvdm avatar Sep 10 '22 13:09 Llewellynvdm