我有一個由paralell plesk託管的MySQL數據庫,我嘗試使用Visual Basic進行連接。目前,每次我試圖連接我碰到下面的錯誤MySQL登錄錯誤
驗證舉辦「xx.xx.xxx.xxx」用戶「myuser的」使用方法「mysql_native_password」失敗消息:拒絕訪問用戶「根'@' 我的公網IP地址(使用密碼:NO)
這裏是我的代碼:
Imports System.Net
Imports MySql.Data.MySqlClient
Public Class SQLControl
Private SQLCon = New MySqlConnection("Server=50.62.209.150 ; user id=root ;password=; database=mytestdb;")
Private SQLCmd As MySqlCommand
Public SQLDA As MySqlDataAdapter
Public SQLDS As DataSet
Public Function HasConnection() As Boolean
Try
SQLCon.Open()
SQLCon.Close()
Return True
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Return False
End Function
Public Sub RunQuery(Query As String)
Try
SQLCon.Open()
' Create Command
SQLCmd = New MySqlCommand(Query, SQLCon)
' Fill Dataset
SQLDA = New MySqlDataAdapter(SQLCmd)
SQLDS = New DataSet
SQLDA.Fill(SQLDS)
SQLCon.Close()
Catch ex As Exception
MsgBox(ex.Message)
' Make sure connection is Closed
If SQLCon.State = ConnectionState.Open Then SQLCon.Close()
End Try
End Sub
你需要允許從你的IP訪問。 看到這個頁面:http://kb.parallels.com/en/1134更多的信息 – psantos
另一件事是,即時通訊使用plesk作爲一個虛擬主機服務,我購買,所以我不知道如何訪問配置文件 –