Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # MySQL in Docker
- docker run --name=mysql01 -p 3306:3306 mysql/mysql-server:latest
- docker exec -it mysql01 mysql -uroot -p
- # Enter the one time password generated from the docker run command
- # and then change the root password
- ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
- # Create a user with your host IP address so it can connect from Buffalo
- # outside the container
- create user 'root'@'172.17.0.1' with password 'mypassword';
- GRANT ALL PRIVILEGES ON * . * TO 'root'@'172.17.0.1';
- # database.yml looks like this
- # Of course, you should be connecting with a different user in a real app.
- development:
- dialect: mysql
- database: coke_development
- user: root
- password: mypassword
- host: 127.0.0.1
- pool: 5
Add Comment
Please, Sign In to add comment