Skip to main content

Installing and Configuring MySQL 8 Database (Windows)

Installing MySQL is not required on for Test Node instances.

MySQLOnly Serverthe Requirements

AIQ controller needs a results database.

SinceAIQ 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 requireswhat 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 version5.7 5.7,did, isso is necessary to assign a bigger instance type. Following aresize the minimumhost for the database and recommendednot resourceonly configurations.

for

the controller. Do not use MySQL 8.1 as— it has somecontains changes AIQ does not yetsupport. Use 8.4 LTS for new installations; 8.0.x remains supported.

MinimumRecommended

Minimum

(performance
  • and load testing)
vCPU - 48
Memory (GB) - 1632
Network Performanceperformance (Gbps)1Up -to 1 5

Performance orand load testing requiresneed athe strongerlarger shape because report generation runs its heavy work inside the stored procedures, on the database as there are performance related processes executed by store procedures. For this case this is a recommended setup:host.

  • vCPU - 8
  • Memory (GB) - 32
  • Network Performance (Gbps) - Up to 5

Recommended MySQL Parameters

parameters

Set

Setupthese values in my.ini on the controller host and restart the MySQL parametersservice. (my.cnfOn 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 MB.

ParameterSuggested valueNotes
key_buffer_size21474836482 GB — MyISAM index cache
myisam_use_mmap1Memory-maps the data files
myisam_sort_buffer_size268435456256 MB for bulk inserts and repairs
myisam_max_sort_file_size21474836482 GB maximum sort file
tmp_table_size21474836482 GB — report temp tables stay in memory
max_heap_table_size2147483648Must match tmp_table_size
innodb_buffer_pool_size42949672964 GB, or my.ini)30 with% of host memory
innodb_log_buffer_size1342177281 % 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 GB — large result sets and BLOBs
bulk_insert_buffer_size536870912512 MB for heavy transactional load
read_buffer_size20971522 MB per sequential MyISAM scan
read_rnd_buffer_size20971522 MB for sorted reads
sort_buffer_size83886088 MB per sorting thread
join_buffer_size41943044 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 belowschema values.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 creatingporting a AWS5.7 RDS,my.ini, dodelete those lines or the service will not runstart.

Install the MySQLAppvance.sql script until you have createddatabase and appliedschema

  1. Install MySQL 8.4 (or 8.0.x) server on the parametercontroller grouphost, withusing belowa settings,service otherwiseaccount youthat willsurvives getreboots.
  2. Stop the followingservice, error:

    "ERROR 1419 (HY000): You don't haveset the SUPERparameters privilegeabove andin binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)"

    After applying this settings you need to stopmy.ini, and start theit RDSagain.
  3. Connect instanceas soroot thisand parametersrun optionsMySQLInitial.sql take— effect.it

    Parameter Name

    Description

    Suggested Value

    AWS RDS Only

    bulk_insert_buffer_size

    This variable limitscreates the size of the cache tree in bytes per thread. Setting it to 0 disables this optimization. The default value is 8MB, we are suggesting 512MB for massive transactional load.

     

    536870912

    No

    connect_timeout

    The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. The default value is handle by AWS dynamically but we are suggesting 10 secs even more depending if there is latency between controller and test nodesschema and the RDS.

    aiq

    10

    No

    max_allowed_packet

    Thedatabase maximumuser.

  4. Run sizeMySQLAppvance.sql ofas onethat packetaiq oruser any— generated/intermediateit string/media, or any parameter sent bycreates the mysql_stmt_send_long_data()AIQ Ctables APIand function.stored Noprocedures.
  5. Reconnect valueand by default, 400MB is suggested.

     

419430400

No

max_connections

The maximum permitted number of simultaneous client connections, 500 connections would be more than enough even forconfirm the morevalues demandingtook environmentseffect (our smoke test RDS reached a maximum of 150 connections bywith the timeverification thisqueries hasbelow.

Both beenscripts written),work thisunchanged parameteron is a TOTAL global connections watermark.

 

500 (Do not apply for RDS instances!)

No

max_user_connections

The maximum number of simultaneous connections permitted to any given MySQL user account. A value of 8.0 (the default) means “no limit”, but this behavior would be inconvenient since in the case of an external factor that affects the RDS connections; such that they'll increase without an error until the mysqld service hangs up, a value of 200 is recommended

 

200

No

myisam_use_mmap

It’s a switch to use memory mapping for reading and writing MyISAM tables, by default the value is 0 but must be 1.

 

1

No

read_buffer_size

Each thread that does a sequential scan for a MyISAM table allocates a buffer of this size (in bytes) for each table it scans.8.4. If you do manynot sequentialhave scans,them, request them from your Appvance account team.

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

Verify before you mightcontinue

SELECT wantVERSION();
SHOW toTABLES;
SHOW increasePROCEDURE thisSTATUS WHERE Db = 'aiq';
SHOW VARIABLES LIKE 'max_allowed_packet';
SHOW VARIABLES LIKE 'wait_timeout';

max_allowed_packet must read 1073741824 and wait_timeout must read 1080. If either shows a default value, whichthe defaultsparameter tofile 131072. The value of this variable should be a multiple of 4KB. If it is set to a value that iswas not apicked multipleup of— 4KB, its value is rounded down to the nearest multiple of 4KB.

This option is also used in the following context for all storage engines:

  • For caching the indexes in a temporary file (not a temporary table), when sorting rows for ORDER BY.
  • For bulk insert into partitions.
  • For caching results of nested queries.

A lot of sub-queries and not natural relations queries are performed against different and nested tables, so it’s needed to set an important amount of cache memory for this purpose 524288 (512MB)

524288

Yes

wait_timeout

This is really important, MySQL 8 kernel works totally different than 5.7 and it’s very sensitive to latency letting all the un-closed connections sleep for a lot of time before closing them by default causing a lot of accumulated connections using resources even when they are not in use anymore.

Set this parameter to 300seconds as the maximum time to wait before destroying the connection

1080 (AIQ-6619)

Yes

validate-password

 

If password validation doesn’t need to performed just set this parameter to OFF, if it is needed let it remains as default (ON) just set passwords according to MySQL 8 security policies.

 

 

log_bin_trust_function_creators

 

1 (stop and start RDS for this to take effect)

 

Yes

 

You must have an AWS account. First create the parameter group and then create the database so you can specify the new parameter group when creating the database.

Create AIQ Parameter Group

You will need to create a parameter group for AIQ mysql database before creating the actual database. Refer to the correct values in the Parameter Group info above.

  1. In Amazon RDS, select Parameter Group.Screen%20Shot%202023-05-18%20at%2011.42.00.png
  2. Enter the details for the parameter group. Click Create.Screen%20Shot%202023-05-18%20at%2011.44.47.png
  3. Click Edit Parameters to configure the parameters. See Recommended MySQL Parameters for the list of parameters and values.
  4. Click Save Changes.
    Screen%20Shot%202023-05-18%20at%2011.46.13.png

 

Creating RDS MySQL Database

  1. On the Console Home page, select the region in which you need the database.
    SQL8_01.png
  2. Select RDS.
    SQL8_02.png
  3. Click Create Database.
    SQL8_03.png
  4. Select Standard Create and MySQL.
    SQL8_04.png
  5. Select MySQL version 8, Production, and Single DB Instance.
    SQL8_05.png
  6. Enter your credentials.
    SQL8_06.png
  7. Selectedited the DB Instance classmy.ini, the Storageservice Type,actually andreads, thethen sizerestart ofit.

    When the Allocated Storage.
    SQL8_07.png

  8. Select Enable storage autoscaling and the VPC.
    SQL8_08.png
  9. Choose the DB Subnet group, Public Access setting and VPC Security Group.
    SQL8_09.png
  10. Choose your Database authentication method.
    SQL8_10.png
  11. Select your monitoring preferences.
    SQL8_11.png
  12. Verify the settingsyou are correctdone

    Continue andwith click Create Database.
    SQL8_12.png

  13. Create a new parameter group forRunning AIQ MySQL databases.
  14. After creating the database.
    SQL8_13.png
    SQL8_15.png
  15. Check connection to the database.
  16. Install the MySQL client.
    Syntax example: mysql -h <example-endpoint-db.rds.amazonaws.com> -P 3306 -u <user_name> -p <push enter>
  17. Run the MySQLInitial.sql script using the admin/root user.
  18. Log out and log back into the mysql client but using the aiq/aiq user, then execute the following statement:

After you have installed and configured MySQL, proceed to the next step: Runing Appvance IQ on Windows as a Service

.

 


Last updated: October 02, 2024

If you haveare anydeploying feedbackthe 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 topic,page.


Last pleaseupdated contactNovember us2026. atApplies documentation@appvance.aito MySQL 8.0.x and 8.4.x on Windows.