Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following are the minimum requirements for a MySQL installation to support PhixFlow.

Installation

Option

Setting

Version

See System Requirements and Compatibility.

The following configuration parameters must be set in my.cnf

datadir

Ensure that the data directory being used has sufficient space for the initial period of PhixFlow operation.

This is in the [mysqld] section of the my.cnf file.

binlog_format

mixed

This must be added to the [mysqld] section of the my.cnf file.

wait_timeout

28800 (this is the default, but some installation processes set this to a much lower value)

This must be in the [mysqld] section of the my.cnf file.

The following configuration parameters can optionally be set in my.cnf

log_bin_trust_function_creators

1

This must be in the [mysqld] section of the my.cnf file.

This setting is needed because PhixFlow's migration scripts sometimes require the use of non-deterministic functions

Example

If you add all parameters above to my.cnf, including the optional parameters, then the [mysqld] section of your my.cnf file should look something like this:

...

You will need a database, and a login with all privileges on that database. The database should be created with the following options:

Option

Setting

character_set_server

utf8

collation_server

utf8_bin

Example installation

The following configuration is suggested as a guide. It incorporates the minimum requirements for MySQL databases above.

...

The command below sets the configuration you need to run PhixFlow. This creates a phixflow specific configuration file (/etc/mysql/conf.d/phixflow.cnf) which will be included by the main configuration file (/etc/mysql/my.cnf)

Note

Check whether you have example configuration files included with your distrubtion under /etc/mysql/mariadb.conf.d - if you do, note that these may override settings you apply via other files.

Determine a suitable innodb_buffer_pool_size, see MySQL Planning. This can be specified in M (megabytes) or G (gigabytes).

You may want to override the default binary log retention settings. By default https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds this is set to 30 days. Note that the binary logs for a busy database can become large - over 30 days, this could be equivalent to the size of the database itself, or even larger if you are deleting and inserting a large number of records.

The simplest option is to reduce the value of binlog_expire_logs_secondsto a smaller period - in the example below, this has been reduced to 172800, which is a period of 2 days.

If you do not intend to use binary logs for database recovery (i.e. you are relying on a different backup solution), you can turn binary logging off. See https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_log_bin but make sure to pay attention to how the variables relate to each other.

Code Block
languagebash
echo "[mysqld]
datadir = /var/lib/mysql
wait_timeout = 28800
binlog_format = mixed
log_bin_trust_function_creators = 1
binlog_expire_logs_seconds = 172800
slow_query_log = 1
long_query_time = 5
innodb_buffer_pool_size = <INNODB BUFFER POOL SIZE>M OR <INNODB BUFFER POOL SIZE>G
innodb_default_row_format = dynamic
innodb_file_per_table = 1
innodb_strict_mode = OFF
table_open_cache = 2000
log_error = /var/log/mysql" | sudo tee /etc/mysql/conf.d/phixflow.cnf

...