/
Install MySQL

Install MySQL

On this page we state the minimum requirements for a MySQL installation to support PhixFlow, and present an example installation.

The example installation incorporates the minimum requirements for MySQL. It is suitable as an initial configuration for many instances of PhixFlow, but note that some of the options may need to change over time as the work carried out by PhixFlow increases.

Minimum requirements

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

Installation

The following parameters must be set:

Parameter

Value

Location

Notes

Parameter

Value

Location

Notes

Version

See System Requirements and Compatibility.

 

 

datadir

 

The [mysqld] section of the my.cnf file.

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

binlog_format

mixed

The [mysqld] section of the my.cnf file.

 

sql_generate_invisible_primary_key

0

The [mysqld] section of the my.cnf file.

 

wait_timeout

28800

The [mysqld] section of the my.cnf file.

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

The following parameters can also optionally be set:

Parameter

Value

Location

Notes

Parameter

Value

Location

Notes

log_bin_trust_function_creators

1

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. If you do not set this, then at some point you may encounter an upgrade where you are required to turn this setting on for the duration of the upgrade - this will be noted in the Special Upgrade Instructions .

require_secure_transport

1

The [mysqld] section of the my.cnf file.

This setting requires that all client connections are encrypted.

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:

[mysqld] ... datadir = /var/lib/mysql wait_timeout = 28800 binlog_format = mixed log_bin_trust_function_creators = 1 sql_generate_invisible_primary_key = 0 require_secure_transport = 1 ...

Database

The following settings are required for the PhixFlow database. All of these parameters are reflected in the example MySQL database creation command given here: Install the PhixFlow Database Schema.

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

Parameter

Value

Parameter

Value

character_set_server

utf8mb4

collation_server

utf8mb4_bin

Example installation

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

It is based on an installation of MySQL Community Edition on the Ubuntu distribution of Linux. Installation on other distributions of Linux will follow a very similar pattern. For Debian-based distributions, many of the commands will be identical. For RHEL-based distributions, the commands will be similar, replacing apt with yum. However, in all cases, please check with in the MySQL documentation (https://dev.mysql.com/doc/refman/8.0/en/linux-installation.html) to check the exact details for installation on your platform.

For Ubuntu 22.04 and MySQL 8.0

Install

sudo apt-get update sudo apt install mysql-server

Set configuration

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).

echo "[mysqld] datadir = /var/lib/mysql wait_timeout = 28800