如何使用MySql Connector远程连接C#和Mysql(HTTP隧道) [英] how to connect remotely C# and Mysql ( HTTP tunneling ) using MySql Connector

查看:137
本文介绍了如何使用MySql Connector远程连接C#和Mysql(HTTP隧道)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码用于将C#与mysql服务器连接

connectionParam = "SERVER=" + DbServer + ";DATABASE=" + dbName + ";UID=" + uName+ ";PASSWORD=" + pass;

MySqlConnection mConnection = new MySqlConnection(connectionParam );


但是,如果只能通过HTTP隧道访问MySql,那么代码将是什么.

隧道URL:http://www.xyzpqr.com/SQLyogTunnel.php

解决方案

您是否尝试过在 ^ ]?

它具有适合大多数情况的示例.


我已经搜索了链接.但是在web.config连接字符串中找不到有关"Http隧道"的任何主题


,您必须提及服务器名称以及用户名和密码


The following code is used to connect C# with mysql server

connectionParam = "SERVER=" + DbServer + ";DATABASE=" + dbName + ";UID=" + uName+ ";PASSWORD=" + pass;

MySqlConnection mConnection = new MySqlConnection(connectionParam );


But what will be the code, if MySql can only be accessed through HTTP Tunneling.

Tunneling URL: http://www.xyzpqr.com/SQLyogTunnel.php

解决方案

Have you tried looking in connectionstrings.com/[^]?

It has examples to suit most circumstances.


i''ve searched the link. But found no topics on "Http Tunneling"


in the web.config connection string you have to mention the server name as well as username and password


这篇关于如何使用MySql Connector远程连接C#和Mysql(HTTP隧道)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆