尝试在本地Internet外部连接mysql数据库,我得到
味精显示:
不允许主机“ 19.108.95.17” ins连接到此mariaDB服务器
19.108.95.17 =不是我当前公开的IP,但是在更新IP之前就已经旧了
让我说一下我当前的IP:15.100.80.30(公共IP)
我的代码:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MysqlConn = New MySqlConnection
MysqlConn.ConnectionString =
"server=15.100.80.30;port=3306;userid=root;password=password;database=mydatabasee"
Try
MysqlConn.Open()
MessageBox.Show("Connection Successful")
MysqlConn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
MysqlConn.Dispose()
End Try
End Sub