...
If the first option does not come up, respond to Set root password?
with y instead. This should only happen if you're installing an old version of MySQL.
For Windows
MySQL 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 - mysql-installer-web-community-8.0.23.msi
is recommended if you have a good internet connection, otherwise choose mysql-installer-community-8.0.23.msi
. Note that both of these installation packages are 32-bit but can install either the 32-bit or 64-bit versions of MySQL.
...
Allow the download to complete and start the installation package
At Choosing a Setup Type, choose Server only
...
...
On the Type and Networking step, select the installation type as appropriate; leave other settings on this page (including networking settings) as default
...
Follow prompts to complete the installation, accepting defaults
This will include setting a root password - make sure you note this down
You may wish to turn off MySQL starting when you start your computer
...
Add mysql to path
It is useful to add the mysql
command to the path
From Settings, open Environment Variables
Edit the System variable Path
...
Add the path
C:\Program Files\MySQL\MySQL Server 8.0\bin
...
Save your changes
Now you can refer to the program mysql
from a CMD or PowerShell window
Add PhixFlow settings
Apply PhixFlow settings in the file C:\ProgramData\MySQL\MySQL Server 8.0\my.ini
. At a minimum apply settings listed in https://phixflow.atlassian.net/wiki/spaces/HELP100/pages/9106727895/Install+MySQL#Installation above. The following is an example configuration.
Example configuration
Add the following settings in the [mysqld]
section of the file
Code Block | ||
---|---|---|
| ||
[mysqld]
wait_timeout = 28800
binlog_format = mixed
log_bin_trust_function_creators = 1
binlog_expire_logs_seconds = 172800
innodb_default_row_format = dynamic
innodb_strict_mode = OFF |
Update the following settings, which should already be in the file:
innodb_buffer_pool_size
to<INNODB BUFFER POOL SIZE>M OR <INNODB BUFFER POOL SIZE>G
, e.g. for a development or test installation on a PC with 16 GB of memory, 1 GB; for full details, see MySQL Planningtable_open_cache
to2000
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)
Code Block | ||
---|---|---|
| ||
slow_query_log = 1
long_query_time = 5
innodb_file_per_table = 1 |
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:
...