Archive for the month “December, 2011”

Connect to MySQL server from HeidiSQL with SSH tunnel

I have spent few hours to figure out how to connect to my MySQL server running at Amazon EC2 with HeidiSQL. The reason I used HeidiSQL is its great friendliness coupled with many great features: copying the whole database from remote servers and vice versa or working with multiple servers at the same time. HeidSQL usually works like a charm with plain TCP connections. However, it gave me some hard time understanding how to use it with SSH enable option.

Very simple. You need to roughly understand how the whole picture is look like. The following two questions will help you when you have to fill in the configurations for the connection.

Amazon EC2 specific questions: 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?


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!

A bit on market research: who is providing historical tick-level market data?

Alright, what we are having on the table now?

After a little bit of researching, I found some quite interesting things.

1. For those who are looking at the daily data, I think Yahoo Finance would be a good place to start. You can download such historical data as much as you want. Of course, as you might know, it is FREE!

2. However, for those who want to have tick level historical data. Yahoo Finance is definitely not good enough. I found the following data providers, you might consider:

TickData: providing a full range of historical financial data of all markets in the world, from stock, equity to options and etc. However, the price is not as that nice. E.g: for a complete database of one year of Japan equity, you have to pay 7000 USD, or full database of Japan equity, it would be 61300 USD. They provide a desktop software to manage and process their historical data and store in your favorite format without any hassle.

CQG Data Factory: seems like a better option for those with lighter pocket as they offer the option for buyer to choose individual instrument rather than the whole market. Also, I couldn’t find they are offering options data (?). About their price, this is an example for your reference. Mini NKY 225, OSE exchange, for 5 months from Jan 2011 to June 2011, the charge is about 90 USD!

XigNite: ?

What else? Maybe I need to dig some more then.

Post Navigation