java.lang.Object
com.aoindustries.aoserv.examples.mysql.AddMysqlUser

public final class AddMysqlUser extends Object
Adds a User to the system.
Author:
AO Industries, Inc.
  • Method Details

    • addMysqlUser

      public static void addMysqlUser(SimpleAoservClient aoClient, Account.Name packageName, User.Name username, Server.Name mysqlServer, String server, Database.Name database, String password) throws IOException, SQLException
      Adds a User to the system.
      Parameters:
      aoClient - the SimpleAoservClient to use
      packageName - the name of the Package
      username - the new username to allocate
      mysqlServer - the name of the MySQL instance
      server - the hostname of the server to add the account to
      database - the new user will be granted access to this database
      password - the password for the new account
      Throws:
      IOException
      SQLException
    • addMysqlUser

      public static UserServer addMysqlUser(AoservConnector conn, Account.Name packageName, User.Name username, Server.Name mysqlServer, DomainName server, Database.Name database, String password) throws IOException, SQLException
      Adds a User to the system.
      Parameters:
      conn - the AoservConnector to use
      packageName - the name of the Package
      username - the new username to allocate
      mysqlServer - the name of the MySQL instance
      server - the hostname of the server to add the account to
      database - the new user will be granted access to this database
      password - the password for the new account
      Returns:
      the new UserServer
      Throws:
      IOException
      SQLException