MySQL Requirements
MySQL Configuration Requirements¶
If you are deploying Comet in a self-hosted environment, it is crucial to configure specific MySQL parameters to ensure optimal performance and functionality.
This applies regardless of where your MySQL instance is hosted—be it a self-managed server, AWS RDS, GCP Cloud SQL, or Azure Database for MySQL.
Note
If you utilize our provided Terraform module or cometctl, these parameters are automatically configured for you.
However, for externally configured MySQL instances, manual configuration is required.
Here are the mandatory MySQL parameters and their recommended values:
Parameter Name | Recommended Value | Description |
---|---|---|
character_set_server | utf8mb4 | Sets the server's default character set. |
character_set_connection | utf8mb4 | Sets the character set for client-server communication. |
character_set_database | utf8mb4 | Sets the default character set for databases. |
character_set_results | utf8mb4 | Sets the character set for result sets sent to the client. |
collation_connection | utf8mb4_unicode_ci | Sets the collation for client-server communication. |
collation_server | utf8mb4_unicode_ci | Sets the server's default collation. |
innodb_flush_log_at_trx_commit | 1 | Ensures logs are written and flushed to disk at transaction commit. |
innodb_lock_wait_timeout | 120 | Specifies the time an InnoDB transaction waits for a row lock. |
max_allowed_packet | 157286400 (150 MiB) | Maximum size of one packet or any generated/intermediate string. |
thread_stack | 6291456 (6 MiB) | Sets the thread stack size for each thread. |
group_concat_max_len | 1048576 (1 MiB) | Maximum result length for the GROUP_CONCAT() function. |
log_bin_trust_function_creators | 1 | Allows the creation of stored functions when binary logging is enabled. |
Please ensure that these parameters are set correctly in your MySQL instance's configuration. Failure to do so may lead to suboptimal performance or unexpected behaviors in our application.