...
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.
Table of Contents | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Minimum requirements
The following are the minimum requirements for a MySQL installation to support PhixFlow.
Installation
...
Option
...
The following parameters must be set:
Parameter | Value | Location | Notes |
---|---|---|---|
Version | |||
| The |
|
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.
|
|
The | |||
|
| The | |
|
| The |
|
is the default, but some installation processes set this to a much lower value |
[mysqld]
section of the my.cnf
file. |
The following
...
parameters can also optionally be set
...
:
Parameter | Value | Location | Notes |
---|---|---|---|
|
|
The | 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 . | |
|
|
The | 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:
Code Block | ||
---|---|---|
| ||
[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 |
---|
|
utf8
|
|
|
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
...
Expand | |||||
---|---|---|---|---|---|
Install
Set configurationThe command below sets the configuration you need to run PhixFlow. This creates a |
...
PhixFlow specific configuration file (
|
...
To help determine a suitable |
...
either with Most cloud-native services (such as Amazon RDS for MySQL or Azure Database for MySQL) will require an encrypted database connection. |
...
To configure this, you will need the following settings:
However, there are scenarios in which a secure connection is not required - such as when MySQL and Tomcat are both installed on the same server. For this type of configuration to work, you will need the following settings:
For instructions on how to set the database URL, see here: Install the PhixFlow Webapp. For official MySQL documentation on database connections, see here: https://dev.mysql.com/doc/refman/8.0/en/ |
...
...
You may want to override the default binary log retention settings. By default, 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 |
...
above, this has been reduced to 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 here for more details: https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_log_bin |
...
- make sure to pay attention to how the variables relate to each other |
...
Code Block | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
echo "[mysqld]
datadir = /var/lib/mysql
wait_timeout = 28800
binlog_format = mixed
log_bin_trust_function_creators = 1
sql_generate_invisible_primary_key = 0
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
require_secure_transport = 1
log_error = /var/log/mysql" | sudo tee /etc/mysql/conf.d/phixflow . Restart MySQL:
HardeningTo harden the installation, run:
Respond to the questions in the following way:
Switching to unix_socket authentication means there is no password for root, instead anybody with sudo access can log in using If the first option does not come up, respond to |
For Windows
Expand |
---|
InstallMySQL includes many configuration options for installing on Windows. The guide below is a recommended installation for mostly MySQL installations on Windows, espcially for development and local testing. If you are installing MySQL on Windows for long term use in a corporate envrionment, make sure you have met any installation standards that apply to database installations in general, and MySQL installations in particular. Go to https://dev.mysql.com/downloads/windows/installer/8.0.html and select either download - At the next page you are invited to create an account but you do not have to - note the link No thanks, just start my download at the bottom of the page |
...
Allow the download to complete and start the installation package
|
...
|
...
|
...
Add mysql to pathIt is useful to add the
|
...
|
...
Now you can refer to the program Add PhixFlow settingsApply PhixFlow settings in the file Example configurationAdd the following settings in the
Update the following settings, which should already be in the file:
Note that the following settings are not mandatory for PhixFlow but are recommended; however, these are already set by default to PhixFlow’s recommended settings (i.e. you do not need to do anything to apply these)
Once you have updated this file, restart MySQL via services to pick up these settings. |
Post-install
Firewall
If you want to access your database from another server:
...
, open your firewall for inbound TCP connections to your server's port (default port is 3306).
Add
...
admin users
You could now use the root user for everything, but it is better practice from a security viewpoint to create individual users with their own passwords. Also,
...
by default, the root user doesn't allow remote access.
You can add admin users using mysql:
...