Class MySqlDatabase

java.lang.Object
org.sgrewritten.stargate.database.MySqlDatabase
All Implemented Interfaces:
SQLDatabaseAPI

public class MySqlDatabase extends Object implements SQLDatabaseAPI
Represents a MySQL database
Author:
Frostalf, Thorin
  • Constructor Details

    • MySqlDatabase

      public MySqlDatabase(DatabaseDriver driver, String address, int port, String database, String userName, String password, boolean useSSL) throws StargateInitializationException
      Instantiates a new MySQL database connection using the given values
      Parameters:
      driver -

      The driver to use for this database communication

      address -

      The address of the MySQL server

      port -

      The port of the MySQL server

      database -

      The database to store Stargate tables in

      userName -

      The username to use when connecting to the database

      password -

      The password to use when connecting to the database

      useSSL -

      Whether or not to force the use of SSL for the connection

      Throws:
      StargateInitializationException
    • MySqlDatabase

      public MySqlDatabase(org.bukkit.plugin.java.JavaPlugin plugin) throws SQLException
      Instantiates a new MySQL database connection using this stargate plugin instance's config
      Parameters:
      plugin -

      An instance of the Stargate plugin

      Throws:
      SQLException -

      If unable to setup a database connection

  • Method Details