OHMySQLConfiguration

Objective-C


@interface OHMySQLConfiguration : NSObject

Swift

class MySQLConfiguration : NSObject

The entity that has authority to use a store MySQL.

  • Can be up to 16 characters long. Operating system user names may be of a different maximum length.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *username;

    Swift

    var username: String { get }
  • Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *password;

    Swift

    var password: String { get }
  • A host name or an IP address.

    Note

    Note that the host parameter determines the type of the connection.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *serverName;

    Swift

    var serverName: String { get }
  • The string specifies the name of database.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *dbName;

    Swift

    var dbName: String { get }
  • If it is not NULL, the string specifies the socket or named pipe to use.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *socket;

    Swift

    var socket: String? { get }
  • If it is not 0, the value is used as the port number for the TCP/IP connection.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger port;

    Swift

    var port: UInt { get set }
  • Used for establishing secure connections using SSL.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) OHSSLConfig *sslConfig;

    Swift

    @NSCopying var sslConfig: MySQLSSLConfig? { get }
  • Initializes and returns a newly allocated object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUser:(nonnull NSString *)user
                                password:(nonnull NSString *)password
                              serverName:(nonnull NSString *)serverName
                                  dbName:(nonnull NSString *)dbName
                                    port:(NSUInteger)port
                                  socket:(nullable NSString *)socket;

    Swift

    init(user: String, password: String, serverName: String, dbName: String, port: UInt, socket: String?)

    Parameters

    user

    The name of connecting user.

    password

    User’ password.

    serverName

    A host name or an IP address.

    dbName

    The name of database

    port

    Port number for TCP/IP connection.

    socket

    The socket or named pipe to use

    Return Value

    User object with the specified parameters

  • Initializes and returns a newly allocated object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUser:(nonnull NSString *)user
                                password:(nonnull NSString *)password
                               sslConfig:(nonnull OHSSLConfig *)sslConfig
                              serverName:(nonnull NSString *)serverName
                                  dbName:(nonnull NSString *)dbName
                                    port:(NSUInteger)port
                                  socket:(nullable NSString *)socket;

    Swift

    init(user: String, password: String, sslConfig: MySQLSSLConfig, serverName: String, dbName: String, port: UInt, socket: String?)

    Parameters

    user

    The name of connecting user.

    password

    User’ password.

    sslConfig

    SSL config object to estable SSL connection.

    serverName

    A host name or an IP address.

    dbName

    The name of database.

    port

    Port number for TCP/IP connection.

    socket

    The socket or named pipe to use

    Return Value

    User object with the specified parameters