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 =连接字符串
下线后
Dim SQLConnection为MySqlConnection = New MySqlConnection
从给出的代码中,我根本看不到您正在使用ConnectionString。
希望能有所帮助