docker-joomla
docker-joomla copied to clipboard
MySQL Connection Error: Access Denied
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?
Only a guess if you use root as user you may have to use MYSQL_ENV_MYSQL_ROOT_PASSWORD
as variable name.
By design, and for security the name root is not allowed.