gpt4 book ai didi

mysql - 视觉基本: Not allowed to connect to MariaDB server

转载 作者:行者123 更新时间:2023-11-29 11:32:38 25 4
gpt4 key购买 nike

This is a list of errors when the application starts with "Visual Studio 2013"                                                                                                                |
|
MySql.Data.MySqlClient.MySqlException (0x80004005): Host 'Computer friendly name' is not allowed to connect to this MariaDB server |
with MySql.Data.MySqliClient.MySqlStream.ReadPacket() |
with MySql.Data.MySqliClient.NativeDriver.Open() |
with MySql.Data.MySqliClient.Driver.Open() |
with MySql.Data.MySqliClient.Driver.Create(MySqlConnectionStringBuilder settings) |
with MySql.Data.MySqliClient.MySqlPool.GetPooledConnection() |
with MySql.Data.MySqliClient.MySqlPool.TryToGetDriver() |
with MySql.Data.MySqliClient.MySqlPool.GetConnection() |
with MySql.Data.MySqliClient.MySqlConnection.Open() |
with WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\(Username)\Documents\Visual Studio 2013\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:line 8 |
-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Line:8 Form1.vb: | |
| "SQLConnection" is a variable I made. |
SQLConnection.Open() | |
| |
-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The code i used in "Form1": |
|
Imports MySql.Data.MySqlClient |
Public Class Form1 |
Dim ConnectionString As String = "Server=localhost;User Id=root;Password=;Database=technical;" |
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load |
Dim SQLConnection As MySqlConnection = New MySqlConnection |
Try |
If SQLConnection.State = ConnectionState.Closed Then |
SQLConnection.Open() |
MsgBox("Succsessfully connected to DB") |
Else |
SQLConnection.Close() |
MsgBox("Failed") |
End If |
Catch ex As Exception |
MsgBox(ex.ToString) |
End Try |
End Sub |
End Class |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
I am using XAMPP to manage the OFF / ON functions, also the configs. |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

地球上有人知道如何修复此权限错误吗?我已经找了好几天的时间来解决这个问题,但一无所获。请帮助我,还有其他关于此问题的帖子得到了答案吗?

最佳答案

你能尝试一下吗

MySqlConnection.connectionstring = 连接字符串

行后

将 SQLConnection 调暗为 MySqlConnection = 新 MySqlConnection

从给出的代码中,我看不出您根本没有使用 ConnectionString。

希望有帮助

关于mysql - 视觉基本: Not allowed to connect to MariaDB server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37138865/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com