Connect to MySQL on AWS from local machine

前端 未结 6 1895
轮回少年
轮回少年 2020-12-23 11:48

I am trying to set up a dev environment on my local machine that accesses a MySQL DB on AWS, but I keep getting a \"Can\'t connect\" message.

mysql_connect(\         


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 12:28

    I suppose this is firewalled by Amazon, try using a SSH tunnel:

    http://blogs.oracle.com/divyen/entry/connecting_mysql_server_on_amazon

    Note: Do not open MySQL to the public internet, not even when using IP filtering. SSH tunnels are way more secure. Best part of it: The tunnel could be accessible with localhost:3306 on your machine, no need to change the config : )

提交回复
热议问题