连接到MySQL数据库 [英] Connecting to MySQL Database
本文介绍了连接到MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
对于使用mysql数据库,我转到cpanel并创建数据库,然后创建用户,最后获得对用户的所有访问权并将用户添加到我的数据库中.
我为
编写了此命令
Hi
For using mysql database i go to cpanel and create database then create user and at last get all access to user and add user to my database.
I write this command for
MySql.Data.MySqlClient.MySqlConnection con =
new MySql.Data.MySqlClient.MySqlConnection("Server=70.86.80.146;Database=pica;Uid=pica;Pwd=MyPassword;");
con .Open();
并在con.open()出现此错误
用户"pica" @``85.185.161.50"的访问被拒绝(使用密码:是)
它说我的用户无法访问,但是我获得了所有访问权限
and at con.open() i get this error
Access denied for user ''pica''@''85.185.161.50'' (using password: YES)
it say my user do not access but i get all access to it
推荐答案
托管服务提供商可能已禁用对MySQL数据库服务器的非本地访问,因此您将无法从该服务器外部进行连接.
请与您的托管服务提供商联系并进行验证.
It is possible the hosting provider has disabled non-localhost access to the mysql database server, so you will not be able to connect from outside that server.
Contact your hosting provider and verify this.
这篇关于连接到MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文