无法连接到我的网站数据库 [英] Unable to connect to my website database

查看:100
本文介绍了无法连接到我的网站数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经购买了一个网络域,并且获得了这些凭据

主机:mywebsite.com.mysql
数据库:数据库名称
用户名:username
密码:密码

我还下载了MYSQL数据库连接器
我使用PHPMyAdmin(由Web服务器提供)创建了一个简单表,并尝试编写一个简单的C#程序来连接数据库.但这引发了一个例外,说
无法连接到任何指定的MYSQL主机"
请注意,我不知道服务器的名称是什么. (我尝试使用主机名作为服务器名,但有相同的例外).

Hi
I have purchased a web domain and I got these credentials

Host: mywebsite.com.mysql
Database: database name
Username: username
Password: password

I also downloaded the MYSQL database connector
I created a simple table using PHPMyAdmin(provided by the webserver) and I tried writing a simple C# program to connect to the database. But it threw an exception saying
"Unable to connect to any of the specified MYSQL hosts"
Note that I don''t know what my server''s name is. (I tried the hostname as the server name but same exception).

推荐答案

在连接字符串(Webconfig文件)中提供数据库名称,用户ID,密码
Give the Database name,user id,password in the connection strings(Webconfig file)


再次检查您的连接字符串....

1)在本地计算机上安装MysqlQuery浏览器,以检查与数据库的连接...
Check Your Connection String Again................

1)Install MysqlQuery Browser on Your Local machine To Check Connection With database...


检查服务器是否已启动(如果未手动启动服务器并尝试连接).

使用SqlDataSource Control.通过此方法,您可以轻松连接到ur服务器以找到连接字符串
Check The Server is Started or not if not manually start the server and than try to connect.

Use SqlDataSource Control.by using this you can easily connect to ur server to find the connection string


这篇关于无法连接到我的网站数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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