简体   繁体   English

尝试连接到在线数据库时,因用户“用户”错误而拒绝访问

[英]Access denied for user 'user' error while trying to connect to online DB

I saw couple of other posts here with the same title, and tried to follow their solutions but no help..我在这里看到了一些具有相同标题的其他帖子,并尝试遵循他们的解决方案,但没有帮助。

I am trying to connect unity3d 5 to a online database.我正在尝试将 unity3d 5 连接到在线数据库。 but I keep getting this error但我不断收到此错误

MySqlException: Access denied for user 'altjenb'@'217.73.137.52' (using password: YES) MySql.Data.MySqlClient.MySqlStream.ReadPacket () MySqlException: 用户 'altjenb'@'217.73.137.52' 的访问被拒绝(使用密码:YES)MySql.Data.MySqlClient.MySqlStream.ReadPacket ()

MySql.Data.MySqlClient.NativeDriver.AuthenticateNew () MySql.Data.MySqlClient.NativeDriver.Authenticate () MySql.Data.MySqlClient.NativeDriver.Open () MySql.Data.MySqlClient.Driver.Open () MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () UnityEngine.EventSystems.EventSystem:Update() MySql.Data.MySqlClient.NativeDriver.AuthenticateNew() MySql.Data.MySqlClient.NativeDriver.Authenticate() MySql.Data.MySqlClient.NativeDriver.Open() MySql.Data.MySqlClient.Driver.Open() MySql.Data.MySqlClient。 Driver.Create(MySql.Data.MySqlClient.MySqlConnectionStringBuilder 设置) MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() UnityEngine.EventSystems。事件系统:更新()

this is my source code in C#:这是我在 C# 中的源代码:

MySqlConnection connectionstring = new MySqlConnection("Server=mysql8.db4free.net; Port=3306;Database=testdb;UserId= altjenb; Password = faeefg; ");

string cmdText = "SELECT 1 FROM Login WHERE Username = awd";
using (MySqlCommand SelectCommand = new MySqlCommand(cmdText, connectionstring)) {
    MySqlDataReader myReader;
    connectionstring.Open();
    myReader = SelectCommand.ExecuteReader();
    int count = 0;

    while (myReader.Read())
    {
        count = count + 1;
    }

    if (count == 0)
    {
        Debug.LogWarning("spunon");
    }
    else {
        Debug.LogWarning("punon");
    }
    }

why do I keep getting this?为什么我一直收到这个? I dont understand..我不明白..

EDIT: after getting a tweet from the db4free, they suggested to change the port from 3306 to 3307. but still getting an error.编辑:从 db4free 收到一条推文后,他们建议将端口从 3306 更改为 3307。但仍然出现错误。

KeyNotFoundException: The given key was not present in the dictionary. KeyNotFoundException: 字典中不存在给定的键。 System.Collections.Generic.Dictionary`2[System.String,MySql.Data.MySqlClient.CharacterSet].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150) System.Collections.Generic.Dictionary`2[System.String,MySql.Data.MySqlClient.CharacterSet].get_Item(System.String 键)(在 /Users/builduser/buildslave/mono/build/mcs/class/corlib/System .Collections.Generic/Dictionary.cs:150)

try to change from mysql8.db4free.net to db4free.net and the port 3306. same user details.尝试从 mysql8.db4free.net 更改为 db4free.net 和端口 3306。相同的用户详细信息。 it should work它应该工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试运行项目时出错:访问被拒绝 - Error while trying to run project: Access is denied 尝试使用 INamedBucketProvider 从 C# 应用程序连接到 Couchbase 时访问被拒绝错误 - Access Denied error while trying to use INamedBucketProvider to connect on Couchbase from C# application 拒绝管理员用户访问 - Access Denied for Admin User 尝试在Visual Studio中连接到Firebird时访问拒绝错误 - Access Denied error when trying to connect to Firebird in Visual Studio 访问被拒绝尝试在Windows用户临时文件夹上提取档案 - access denied trying extracting an archive on the windows user temp folder 尝试获取客户端进程可执行文件路径时访问拒绝错误 - Access Denied Error while trying to get the client process executable path Azure Function 使用 SharePoint Online 和 CSOM .NET Standard 更新用户配置文件拒绝访问 - Azure Function Updating user profile using SharePoint Online and CSOM .NET Standard gives access denied 我收到此错误消息:用户的访问被拒绝(使用密码是) - I got this error message : Access denied for user (Using password YES) 尝试访问用户信息时如何避免访问被拒绝的异常? - How can I avoid an access denied exception when trying to access User Information? 元数据包含无法解析的引用。 尝试连接到CRM Online 2015时出错 - Metadata contains a reference that cannot be resolved. Error while trying to connect to CRM Online 2015
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM