Guest User

Untitled

a guest
Aug 31st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. # MySQL in Docker
  2. docker run --name=mysql01 -p 3306:3306 mysql/mysql-server:latest
  3. docker exec -it mysql01 mysql -uroot -p
  4. # Enter the one time password generated from the docker run command
  5. # and then change the root password
  6. ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
  7. # Create a user with your host IP address so it can connect from Buffalo
  8. # outside the container
  9. create user 'root'@'172.17.0.1' with password 'mypassword';
  10. GRANT ALL PRIVILEGES ON * . * TO 'root'@'172.17.0.1';
  11.  
  12. # database.yml looks like this
  13. # Of course, you should be connecting with a different user in a real app.
  14. development:
  15. dialect: mysql
  16. database: coke_development
  17. user: root
  18. password: mypassword
  19. host: 127.0.0.1
  20. pool: 5
Add Comment
Please, Sign In to add comment