EC2 MySQL Remote Access
Skip to end of metadata
Go to start of metadata
To access MySQL on EC2, you will use SSH tunnel, and do the following,
-
Install msygit if you have not done so (see Useful Tools). This will give you SSH command line tools
-
Start SSH tunneling (password for phpdev is ...)
ssh -L
13306
:localhost:
3306
phpdev
@50
.19.
223.35
- Access MySQL on port 13306 (e.g. mysql -u tcloud -p -P 13306)
EC2 Setup
The following setup was done on EC2 which enables SSH tunneling access to EC2 MySQL instance. See http://blogs.oracle.com/divyen/entry/connecting_mysql_server_on_amazon for more details.
- Edit /etc/ssh/sshd_config to set AllowTcpForwarding to yes.
-
Restart sshd nad mysqld
sudo /etc/init.d/sshd restart
sudo /etc/inid.d/mysqld restart