Skip to content

MySQL Module Account

DizzasTeR edited this page Nov 2, 2020 · 1 revision

MySQL.createAccount

createAccount

Creates a MySQL account with the given details and returns a MySQLAccount instance

MySQLAccount MySQL.createAccount(string host, string user, string password, string database [, int port = 3306, string unix_socket = ""])

Parameters

  • string host - The host to connect to
  • string user - Account username to use
  • string password - The password to authorize the account
  • string database - The database to request
  • int port - The port to use. Default: 3306
  • string unix_socket - The unix socket to use (Only for Linux) (Default empty string)

Returns

MySQLAccount - Returns an instance of MySQLAccount if successful

Example

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