Programming language e.g. PHP, JAVASCRIPT, coding, web developing hints and skills applying on mobile device e.g. iphone
2012/03/12
use SSH connection for MYSQL
Do I need to open the port 3306 for MySQL server to accept outside connections if I use SSH connection?
Answer: No, you don’t need. The reason is you are making an SSH connection to the SSH server at your Amazon EC2 from your local computer (where the HeidiSQL is), not directly making a connection to MySQL server anymore. More precisely, you have to make sure your SSH is running (this is as I know the default config of Amazon), opening the default port for SSH to accept outside connections: port 22 and that’s it.
HeidiSQL specific question: How do I enter the params in the Heidi?
Answer:
In the ‘Settings’ tab
1. In the dropdown list of ‘Network type’, please select SSH tunnel
2. Hostname/IP: localhost (even you are connecting remotely)
3. Username & Password: your mysql user and password
Next, in the tab SSH Tunnel:
1. specify plink.exe or you need to download it and specify where it’s located
2. Host + port: the remote IP of your SSH server(should be MySQL server as well), port 22 if you don’t change anything
3. Username & password: SSH username (not MySQL users)
4. You might ignore the password in the above step if you have the .ppk file.
After that, you can test the connection. Hope it works!
訂閱:
發佈留言 (Atom)
沒有留言:
發佈留言