How can I connect to a mysql database trough C#,
This is my connection string now:
connectionString="server=localhost;port=3306;user id=root;Password=*****;database=Data" providerName="MySql.Data.MySqlClient"
How to put SSH string in this form as it needs to be something like:
SSH Hostname, SSH Username, SSH password, Mysql Hostname, Mysql Username, Mysql Password, Port
解决方案
I don't think MySql and the MySqlClient support such a thing. The connection string is specifically for the database. You will need an SSH client to connect first to the SSH server and then find a way to route the Sql connection over that tunnel.
I don't think there is a Microsoft .Net library for handling SSH connections but there is an open source project on Code Plex that might help.