MySQL Driver Config

interface MySQLDriverConfig {
    customPoolConfig: null | PoolOptions;
    database: string;
    engine: string;
    foreignKeys: boolean;
    host: string;
    password: string;
    port: number;
    prefix: string;
    rowLocking: boolean;
    tableLocking: boolean;
    transactions: boolean;
    user: string;
}

Properties

customPoolConfig: null | PoolOptions

If you need to use custom options, like SSL, you can provide them here in place of the above options.

database: string

The MySQL database.

engine: string

The MySQL table engine.

You should use MYISAM if you are using MySQL < 5.6.

Options are: Any MySQL storage engine supported on your server.

foreignKeys: boolean

Whether to use foreign keys. If your table engine doesn't support it (like MYISAM), you should turn this off.

host: string

The host on which to connect to MySQL. Can include a port, like hostname:port.

password: string

The MySQL password.

port: number

The port on which to connect to MySQL.

prefix: string

The MySQL table name prefix.

rowLocking: boolean

Whether to use row locking. If your table engine doesn't support it (like MYISAM), you should turn this off.

tableLocking: boolean

Whether to use table locking. If you use row locking, this should be off. If you can't use row locking (like with MYISAM), you can use table locking to ensure data consistency.

transactions: boolean

Whether to use transactions. If your table engine doesn't support it (like MYISAM), you should turn this off.

user: string

The MySQL user.