Guest User

Untitled

a guest
Apr 4th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Percona Setup
  2. =============
  3.  
  4. Reminder Notes on how you set this up.
  5.  
  6. ### Digital Ocean
  7.  
  8. 1. Spin up a new Droplet using a Docker image under “One Click Apps”
  9. 2. Shell into Droplet.
  10.  
  11. ### Add the Percona Server Container
  12.  
  13. 1. `docker run --name CONTAINER_NAME -e MYSQL_ROOT_PASSWORD=ROOT_PASSWORD -e MYSQL_USER=MYSQL_USER -e MYSQL_PASSWORD=MYSQL_PASSWORD -e MYSQL_DATABASE=MYSQL_DATABASE -p 3306:3306 -d percona/percona-server:5.6`
  14.  
  15. ### Open the Firewall
  16.  
  17. This uses UFW and obviously these settings aren’t very restrictive. Use at your own risk and customize as needed.
  18.  
  19. 1. `sudo ufw allow mysql`
  20. 2. `sudo ufw enable`
  21.  
  22. ### Grant Permissions to Remote User
  23.  
  24. 1. Shell into Container
  25. * `docker run -it --link CONTAINER_NAME --rm percona sh -c 'exec mysql -h CONTAINER_NAME -u root -pROOT_PASSWORD'`
  26. 2. Grant Permissions (customize for your needs)
  27. * `GRANT ALL PRIVILEGES ON *.* TO 'MYSQL_USER'@'CONNECTING_IP' IDENTIFIED BY 'MYSQL_USER_PASSWORD'`
  28. * `FLUSH PRIVILEGES`
Add Comment
Please, Sign In to add comment