Skip to content

Instantly share code, notes, and snippets.

@jujhars13
Last active May 8, 2024 10:33
Show Gist options
  • Save jujhars13/49c42290939378ec672eaebd53e63f0c to your computer and use it in GitHub Desktop.
Save jujhars13/49c42290939378ec672eaebd53e63f0c to your computer and use it in GitHub Desktop.
nginx-mysql-proxy
#sudo wget http://nginx.org/download/nginx-1.9.12.tar.gz
#sudo tar -xvzf nginx-1.9.12.tar.gz
#cd nginx-1.9.12
#sudo apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g-dev
#sudo ./configure --with-stream && sudo make && sudo make install
# /usr/local/nginx/conf/nginx.conf - NGINX configuration file
worker_processes 1;
events {
worker_connections 1024;
}
stream {
server {
listen 3306;
proxy_pass my-instance-rds.mysq-aws-account.eu-west-2.rds.amazonaws.com:3306;
}
}
/usr/local/nginx/sbin/nginx
@jujhars13
Copy link
Author

jujhars13 commented Sep 8, 2017

Create a mysql nginx proxy, especially useful when transferring/accessing from a AWS non-VPC instance into a VPC or using AWS database migration service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment