Hello i have huge problem. I'm trying to run rails and mysql on separate docker containers. in docker-compose.yml i have :
version: '2'
services:
db:
image: mysql
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: zzz
MYSQL_USER: root
MYSQL_PASSWORD: zzz
MYSQL_DATABASE: zzz
web:
build: .
command: bundle exec rails s -p 3000
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
and in my rails database.yml
development:
adapter: mysql2
encoding: utf8
database: zzz
pool: 5
username: root
password: zzz
host: database.dev //this is host for container with mysql
port: 3306
end when i run application i got error :
Access denied for user 'root'@'xxx' (using password: YES) where xxx is ip my machine not container. Please help i dont know what to do