PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TempDb.MySql.Base.TempDbMySqlServerSettings.TempDbOptions Class Reference

Options which define how to start up mysqld. More...

Static Public Attributes

const int DEFAULT_RANDOM_PORT_MIN = 13306
 Default minimum port to use when selecting a random port.
const int DEFAULT_RANDOM_PORT_MAX = 53306
 Default maximum port to use when selecting a random port.
const int DEFAULT_MAX_TIME_TO_CONNECT_AT_START_IN_SECONDS = 15
 The default max time to wait for a successful connection at startup, in seconds.
const string DEFAULT_ROOT_PASSWORD = "root"

Properties

bool LogRandomPortDiscovery [get, set]
 Flag: log attempts to locate a random, usable port to listen on.
int RandomPortMin = DEFAULT_RANDOM_PORT_MIN [get, set]
 Minimum port to use when selecting a random port.
int RandomPortMax = DEFAULT_RANDOM_PORT_MAX [get, set]
 Maximum port to use when selecting a random port.
int? PortHint [get, set]
 If a port hint is set (or implied via the environment variable TEMPDB_PORT_HINT), then that port is used as the first attempt for an open port and failures to bind on that port are dealt with by incrementing the attempted port number instead of randomizing. This can be useful if debugging against a tempdb instance.
Action< string > LogAction = s => Trace.WriteLine(s) [get, set]
 Action to invoke when attempting to log.
string PathToMySqlD [get, set]
 Full path to mysqld.exe, if you wish to specify a specific instance.
string DefaultSchema = "tempdb" [get, set]
 Default schema name to use.
bool ForceFindMySqlInPath [get, set]
 Force finding mysqld in the path -> this is the default on !windows, but it can be forced there.
string Name [get, set]
 Sets a name for this instance. Named instances will attempt to share schema.
string RootUserPassword = DEFAULT_ROOT_PASSWORD [get, set]
 Set the root password; used to default to blank but there are stupid connectors which infer that a blank password means no password :/.
TimeSpan? InactivityTimeout [get, set]
 When set, will automatically shut down the service process if still alive this long from after first properly started up and no new connections have been made in that time.
TimeSpan? AbsoluteLifespan [get, set]
 When set, sets an absolute lifespan for this temp db process.
bool EnableVerboseLogging [get, set]
 Enable verbose logging if you want to track down issues with more information at hand. This may also be enabled at run-time with the environment variable TEMPDB_VERBOSE, which overrides any setting that was provided.
int MaxTimeToConnectAtStartInSeconds [get, set]
 When attempting to spin up MySql, how much grace period (in seconds) to give before giving up on connecting.
bool? AttemptGracefulShutdown [get, set]
 When shutting down the mysql server, attempt to do so gracefully with the SHUTDOWN command, before terminating the process.
string TemplateDatabasePath [get, set]
 When set, instead of winding up a mysql instance from scratch, copy the contents of this folder to the working dir and start with that.
bool AutoTemplate = true [get, set]
 When set (default true), then:
bool DisableHostnameLookups = true [get, set]
 When set (default true), then: set the my.cnf option skip-name-resolve to (hopefully) speed things up a little.

Detailed Description

Options which define how to start up mysqld.

Property Documentation

◆ AutoTemplate

bool PeanutButter.TempDb.MySql.Base.TempDbMySqlServerSettings.TempDbOptions.AutoTemplate = true
getset

When set (default true), then:

  1. if there is no template stored for the current mysql version, one is created
  2. if there is a template found for the current mysql version, it's used

◆ EnableVerboseLogging

bool PeanutButter.TempDb.MySql.Base.TempDbMySqlServerSettings.TempDbOptions.EnableVerboseLogging
getset

Enable verbose logging if you want to track down issues with more information at hand. This may also be enabled at run-time with the environment variable TEMPDB_VERBOSE, which overrides any setting that was provided.

  • turn on with "1", "yes", "true"
  • turn off with "0", "no", "false"

◆ MaxTimeToConnectAtStartInSeconds

int PeanutButter.TempDb.MySql.Base.TempDbMySqlServerSettings.TempDbOptions.MaxTimeToConnectAtStartInSeconds
getset
Initial value:
=
const int DEFAULT_MAX_TIME_TO_CONNECT_AT_START_IN_SECONDS
The default max time to wait for a successful connection at startup, in seconds.
Definition TempDbMySqlServerSettings.cs:74

When attempting to spin up MySql, how much grace period (in seconds) to give before giving up on connecting.

◆ RootUserPassword

string PeanutButter.TempDb.MySql.Base.TempDbMySqlServerSettings.TempDbOptions.RootUserPassword = DEFAULT_ROOT_PASSWORD
getset

Set the root password; used to default to blank but there are stupid connectors which infer that a blank password means no password :/.

Use this as the root password; doesn't have to be secure for testing purposes, but does have to pass any default mysql password constraints for the service to start up


The documentation for this class was generated from the following file:
  • source/TempDb/PeanutButter.TempDb.MySql.Base/TempDbMySqlServerSettings.cs