Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class MySqlDatabase

  1. Object
  2. Database
  3. ServerDatabase
  4. MySqlDatabase
A MySQL or MariaDB server, over its wire protocol with no driver. See ServerDatabase.

Fields

public static final int DEFAULT_PORT = 3306The port MySQL or MariaDB listens on unless configured otherwise.

Constructors

public MySqlDatabase(String host, int port, String database, String user, String password) throws IOExceptionConnects WITHOUT TLS (sslMode=disable): the password and the data cross the network unencrypted.
public MySqlDatabase(String host, int port, String database, String user, String password, String sslMode, int timeoutMillis) throws IOExceptionConnects and signs in; see ServerDatabase for sslMode.

Inherited fields

Inherited methods

Field details

DEFAULT_PORT

public static final int DEFAULT_PORT = 3306
The port MySQL or MariaDB listens on unless configured otherwise.

Constructor details

MySqlDatabase

public MySqlDatabase(String host, int port, String database, String user, String password) throws IOException
Connects WITHOUT TLS (sslMode=disable): the password and the data cross the network unencrypted. Connecting, and each wait for the server, may take 30 seconds.

MySqlDatabase

public MySqlDatabase(String host, int port, String database, String user, String password, String sslMode, int timeoutMillis) throws IOException
Connects and signs in; see ServerDatabase for sslMode.