we came up with 3...
ssh -n -N -T -L 3306:localhost:3306 tunneluser@192.168.10.1
redirect stdin
do not execute a remote command
disable pseudo-terminal allocation
forward local port to remote host:port
be an ec2 instance
be in the same security group as your rds instance
have a public ip address
not allow inbound traffic from the internet
is relatively easy and straight-forward
can be run with minimal hardware/resources
also assumes that you're able to load the rds instance using a mysqldump file
or want finer control over the data being replicated?
with replication filters for specific databases and tables
or
show global variables like "have%ssl%";
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| have_openssl | DISABLED |
| have_ssl | DISABLED |
+---------------+----------+
DISABLED or YES is what you're looking for,
if no, then SSL with this server is not possible
be an ec2 instance
be in the same security group as your rds instance
have a public ip address
not allow inbound traffic from the internet
one for the original master server
openssl req -new -x509 -nodes -days 360 -key ca-key.pem -out ca.pem
openssl req -newkey rsa:2048 -days 360 -nodes -keyout \
server-key.pem -out server-req.pem
openssl rsa -in server-key.pem -out server-key.pem
openssl x509 -req -in server-req.pem -days 360 -CA ca.pem -CAkey \
ca-key.pem -set_serial 01 -out server-cert.pem
ssl-ca=/etc/mysql/certs/ca-cert.pem
ssl-cert=/etc/mysql/certs/server-cert.pem
ssl-key=/etc/mysql/certs/server-key.pem
openssl req -newkey rsa:2048 -days 360 -nodes -keyout \
client-key.pem -out client-req.pem
openssl rsa -in client-key.pem -out client-key.pem
openssl x509 -req -in client-req.pem -days 360 -CA ca.pem -CAkey \
ca-key.pem -set_serial 01 -out client-cert.pem
CHANGE MASTER TO
MASTER_SSL=1,
MASTER_SSL_CA='/etc/mysql/certs/ca-cert.pem',
MASTER_SSL_CERT='/etc/mysql/certs/client-cert.pem',
MASTER_SSL_KEY='/etc/mysql/certs/client-key.pem'
CALL mysql.rds_set_external_master (
'sum.tin.pri.v8',
3306,
'replication_user',
'replication_user_password',
'mysql-binlogs.000001',
1,
0
);