VB.net Program to Get the Mysql Version

VB.net Program to Get the Mysql Version

VB.Net program to get the MySQL version

'VB.NET program to get MySQL version.

Imports MySql.Data.MySqlClient

Module Module1
    Sub Main()
        Dim connString As String

        'Connection String to connect with MySQL database.
        connString = "server=localhost;userid=root;password=root;database=mydb"

        Dim conn As New MySqlConnection(connString)

        conn.Open()
        Console.WriteLine("MySQL version : " & conn.ServerVersion)
        conn.Close()
    End Sub
End Module
MySQL version : 8.0.22
Press any key to continue . . .
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment