From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Boolean )
aMySQLCommunityServer.SSLEnabled = newBooleanValue
BooleanValue = aMySQLCommunityServer.SSLEnabled

New in 2019r2

Supported for all project types and targets.

Set to True to enable an SSL connection.


You can securely connect to MySQL using SSLEnabled and associated properties:

Var db As New MySQLCommunityServer
db.Host = ""
db.Port = 3306
db.DatabaseName = "BaseballLeague"
db.UserName = "broberts"
db.Password = "streborb"
db.SSLEnabled = True

// Specify SSL key file
db.SSLKey = New FolderItem("MySQLKeyFile")

// Specify SSL certificate file
db.SSLCertificate = New FolderItem("MySQLCertificateFile")

// Specify SSL authority file
db.SSLAuthority = New FolderItem("MySQLAuthFileFile")

// Specify SSL authority directory
db.SSLAuthorityFolder = New FolderItem("SSLCACertFile")

// Specify SSL cipher
Var cipher As String
cipher = "DHE-RSA-AES256-SHA"
db.SSLCipher = cipher

Catch error As DatabaseException
MessageBox("Connection failed. Error: " + error.Message)
End Try

See Also

MySQLCommunityServer.SSLCertificate, MySQLCommunityServer.SSLKey, MySQLCommunityServer.SSLAuthority, MySQLCommunityServer.SSLAuthorityDirectory, MySQLCommunityServer.SSLCipher