racl101 + port   29

Connecting to a mysql running on a Docker container · Issue #95 · docker-library/mysql
Frankly, this forum page has no consensus on a solution to this issue. Nevertheless, what worked for me on my set up with running MacOS as the Docker host and running a container with: Ubuntu 16.04 and MySQL 5.7 is the following:

1) Within the container: change in /etc/mysql/mysql.conf.d/mysqld.cnf the bind-address option from 127.0.0.1 to 0.0.0.0
2) Restart MySQL server (note that whenever you start MySQL you must use this command in the Dockerfile:

RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start

That is, you must touch the files in /var/lib/mysql and then start the server with service command and not systemctl.

Next, create a user separate from root e.g. dev_1, in MySQL and given them privileges to their '0.0.0.0' and '%' hosts. Like this in the Dockerfile:

RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start && mysql -uroot -proot mysql -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; CREATE USER 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret'; GRANT ALL ON *.* TO 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; GRANT ALL ON *.* TO 'dev_1'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES;"

Then when you start the container you must publish the port number like so:

docker run -t -d -p 4406:3306 ubuntu_16_04_lemp_php_7_2:latest

If your container stops prematurely, then you might want to add a CMD line in your docker file to run a start.sh script and within that script you might want to add something like this:

# stupid hack to keep container from being stopped
tail -f /dev/null

Finally, to connect to your DB instance on your local MacOS machine with an app like Sequel Pro for example, use the following credentials:

Host: 0.0.0.0
Username: dev_1
Password: <dev_1_password>
Port: 4406

If you don't like to use port 4406, try 3307, 3308, 3309.
github  forum  howto  example  troubleshoot  mysql  server  docker  host  connection  issue  sequel  pro  mariadb  client  hostname  docker-machine  ip  address  ipaddress  guide  reference  toread  tolearn  totry  tounderstand  image  port  detached  database  credentials 
october 2018 by racl101
Create a Classic Load Balancer with an HTTPS Listener - Elastic Load Balancing
If setting up a classic (elastic) load balancer on AWS with HTTPs listener to accept traffic from the internet, for which, you can also set up security from load balancer to EC2 instance, then this is the documentation you should be looking at.
aws  amazon  elastic  load  balancer  elb  classic  howto  guide  reference  documentation  tutorial  connect  private  ssl  port  443  https  secure  backend  authentication  certificate  public  key  listener 
november 2017 by racl101
Create a Classic Load Balancer with an HTTPS Listener - Elastic Load Balancing
If setting up a classic (elastic) load balancer on AWS with HTTPs listener to accept traffic from the internet, for which, you can also set up security from load balancer to EC2 instance, then this is the documentation you should be looking at.
aws  amazon  elastic  load  balancer  elb  classic  howto  guide  reference  documentation  tutorial  connect  private  ssl  port  443  https  secure  backend  authentication  certificate  public  key  listener 
november 2017 by racl101
Create a Classic Load Balancer with an HTTPS Listener - Elastic Load Balancing
This is the section that talks about how to connect from Load Balancer to instances and goes over the process of adding public keys of self signed certificates created on EC2 instances to the AWS ELB service for classic load balancers.
aws  amazon  elastic  load  balancer  elb  classic  howto  guide  reference  documentation  tutorial  connect  private  ssl  port  443  https  secure  backend  authentication  certificate  public  key 
november 2017 by racl101
List of TCP and UDP port numbers - Wikipedia, the free encyclopedia
Shows common port numbers used by server services for connectivity
numbers  wikipedia  common  Udp  tcp  port 
march 2015 by racl101
OS X « Bruno’s blog
Good reference for installing lftp.

Type : sudo port install lftp in a terminal and your done.
lftp  macports  port  mac  os  x  unix  blog  ftp 
april 2010 by racl101
PortForward.com - Port Forwarding Guides Listed by Manufacturer and Model
Somewhat useful site about Port Forwarding in routers. Didn't really help me for my problem but it could help.
networking  howto  router  firewall  network  security  internet  reference  tutorial  tools  port 
march 2010 by racl101

related tags

about.com  access  address  admin  airport  amazon  ansible  apache  apple  askubuntu  authentication  aws  backend  balancer  blog  certificate  Check  ci  classic  client  command  commands  common  composer  connect  connection  container  continuous  continuousintegration  credentials  curl  cybercity  database  detached  digitalocean  dns  docker  docker-machine  documentation  dyndns  editor  elastic  elasticsearch  elb  error  example  explanation  expose  firewall  forum  forward  forwarding  fowarding  freeware  ftp  github  Gmail  guide  host  hosting  hostname  howto  http  https  image  imap  info  install  integration  internet  ip  ipaddress  issue  java  jenkins  kb  key  keyboard  lftp  linux  lion  listen  listener  load  local  localhost  mac  machine  macos  macosx  macports  mariadb  max  migrate  module  mysql  nas  netstat  network  networking  nginx  numbers  open  os  osx  outside  Packagecontrol  Packages  performance  permission  PHP  PHPresque  ping  port  private  pro  public  queue  queueing  reference  refused  router  Ruby  secure  security  sequel  server  serverfault  Settings  setup  shortcuts  smtp  ssh  ssl  stackexchange  stackoverflow  start  Sublimtext  Sublimtext3  Sync  tcp  tolearn  tomcat  tools  toread  totry  tounderstand  troubleshoot  troubleshooting  tutorial  ubuntu  ubuntu16.04  Udp  ufw  unix  unixcraft  utility  vagrant  virtual  webpage  webserver  wget  wikipedia  within  workers  x  youtube 

Copy this bookmark:



description:


tags: