mysql 在亚马孙的 EC2上使用
·
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 -L13306:localhost:3306phpdev@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 restartsudo /etc/inid.d/mysqld restart
更多推荐
所有评论(0)