Skip to main content

Installing and Configuring MySQL 8 Database (Windows)

Installing MySQL is not required for Test Node instances. Only the AIQ controller needs a results database.

AIQ stores results in a MySQL 8 database. There are two supported ways to provide it: a local MySQL server on the Windows controller host, which is what this page covers, or Amazon RDS for MySQL, which is the recommended shape for production — see MySQL 8.x Database on AWS RDS (8.0 and 8.4).

Server requirements

MySQL 8 needs more resources than MySQL 5.7 did, so size the host for the database and not only for the controller. Do not use MySQL 8.1 — it contains changes AIQ does not support. Use 8.4 LTS for new installations; 8.0.x remains supported.

MinimumRecommended (performance and load testing)
vCPU48
Memory (GB)1632
Network performance (Gbps)1Up to 5

Performance and load testing need the larger shape because report generation runs its heavy work inside the stored procedures, on the database host.

Set these values in my.ini on the controller host and restart the MySQL service. On a self-hosted server you set the memory values directly instead of using the RDS formulas.

MyISAM matters more than InnoDB here. AIQ keeps its report tables on MyISAM, so key_buffer_size is what keeps report queries off the disk. Production indexes total roughly 757 757 MB.

ParameterSuggested valueNotes
key_buffer_size21474836482 2 GB — MyISAM index cache
myisam_use_mmap1Memory-maps the data files
myisam_sort_buffer_size268435456256 256 MB for bulk inserts and repairs
myisam_max_sort_file_size21474836482 2 GB maximum sort file
tmp_table_size21474836482 2 GB — report temp tables stay in memory
max_heap_table_size2147483648Must match tmp_table_size
innodb_buffer_pool_size42949672964 4 GB, or 30 30 % of host memory
innodb_log_buffer_size1342177281 1 % of host memory
innodb_flush_log_at_trx_commit2Faster commits, small durability trade-off
innodb_io_capacity / _max2000 / 4000SSD storage
max_connections500Global connection ceiling on a dedicated host
max_user_connections200Per-user ceiling
wait_timeout / interactive_timeout1080Sleeping connections accumulate otherwise (AIQ-6619)
connect_timeout10Handshake timeout
max_allowed_packet10737418241 1 GB — large result sets and BLOBs
bulk_insert_buffer_size536870912512 512 MB for heavy transactional load
read_buffer_size20971522 2 MB per sequential MyISAM scan
read_rnd_buffer_size20971522 2 MB for sorted reads
sort_buffer_size83886088 8 MB per sorting thread
join_buffer_size41943044 4 MB per join without an index
table_open_cache4000Open table descriptors
table_definition_cache2000Cached table definitions
thread_cache_size100Threads kept for reuse
log_bin_trust_function_creators1Required — the schema scripts create stored procedures
validate_passwordOFFLeave ON if policy requires it, then match it in every password
slow_query_log / long_query_time1 / 5Optional — queries slower than 5 seconds

No query cache. MySQL 8 removed query_cache_size and query_cache_type. If you are porting a 5.7 my.ini, delete those lines or the service will not start.

Install the database and schema

  1. Install MySQL 8.4 (or 8.0.x) server on the controller host, using a service account that survives reboots.
  2. Stop the service, set the parameters above in my.ini, and start it again.
  3. Connect as root and run MySQLInitial.sql — it creates the schema and the aiq database user.
  4. Run MySQLAppvance.sql as that aiq user — it creates the AIQ tables and stored procedures.
  5. Reconnect and confirm the values took effect with the verification queries below.

Both scripts work unchanged on 8.0 and 8.4.

Where the schema scripts are

You do not need to request these files — they ship inside the AIQ distribution. The two scripts live in the database folder of the TestNode web application:

PlatformPath
Windows<AIQ>\TestNode\webapps\AppvanceServer\WEB-INF\classes\database
Linux / macOS<AIQ>/TestNode/webapps/AppvanceServer/WEB-INF/classes/database

<AIQ> is the aiq_distribution folder of the package you installed — on Windows that is normally C:\AIQ\aiq_distribution, so the full path is C:\AIQ\aiq_distribution\TestNode\webapps\AppvanceServer\WEB-INF\classes\database. Both MySQLInitial.sql and MySQLAppvance.sql are in that folder.

Software downloads (official MySQL site):

mysql mysql -u root u root -p
SOURCE SOURCE /path/to/MySQLInitial.sql;
SOURCE SOURCE /path/to/MySQLAppvance.sql;

Verify before you continue

SELECT SELECT VERSION();
SHOW SHOW TABLES;
SHOW PROCEDURE STATUS WHERE Db SHOW PROCEDURE STATUS WHERE Db =  'aiq';
SHOW VARIABLES LIKE SHOW VARIABLES LIKE 'max_allowed_packet';
SHOW VARIABLES LIKE SHOW VARIABLES LIKE 'wait_timeout';

max_allowed_packet must read 1073741824 and wait_timeout must read 1080. If either shows a default value, the parameter file was not picked up — check that you edited the my.ini the service actually reads, then restart it.

When you are done

Continue with Running AIQ on Windows as a Service. If you are deploying the database on AWS instead of locally, use MySQL 8.x Database on AWS RDS (8.0 and 8.4) — the parameter group, instance sizing and troubleshooting there replace the my.ini section of this page.


Last updated November 2026. Applies to MySQL 8.0.x and 8.4.x on Windows.