3 Mayıs 2019 Cuma

VB.NET Remote Mysql Database Connection

Firstly download this file.

https://www.cryptool.org/trac/CrypTool2/export/2020/trunk/AppReferences/x64/MySql.Data.dll

After add import Mysql Data Client in to form

Imports MySql.Data.MySqlClient

and connect remote mysql database vith vb.net

MySqlConnection("server=remotemysql.com; User Id=FKQwSrN1Hj; pwd=2R9f6eYDaa; database=FKQwSrN1Hj;")
       

All Codes:

Imports MySql.Data.MySqlClient
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim MySQLconn As New MySqlConnection
        MySQLconn = New MySqlConnection("server=remotemysql.com; User Id=FKQwSrN1Hj; pwd=2R9f6eYDaa; database=FKQwSrN1Hj;")
        Try
            MySQLconn.Open()
            MsgBox("Connection Sucess", vbOKOnly)
            MySQLconn.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub
End Class

Hiç yorum yok:

Yorum Gönder