Skip to content

MySQL Module Connection

DizzasTeR edited this page Nov 2, 2020 · 1 revision

MySQL.createConnection

createConnection

Establish a MySQL connection with a MySQLAccount instance

MySQLConnection MySQL.createConnection(MySQLAccount account)

Parameters

  • MySQLAccount account - The account to use

Returns

MySQLConnection - Returns an instance of MySQLConnection if successful otherwise an exception is thrown if the account is invalid

Example

local account = MySQL.createAccount("127.0.0.1", "myuser", "mypass", "mydatabase")
local connection = MySQL.createConnection(account)
Clone this wiki locally