added comment about MySQL Server parameter sql_generate_invisible_primary_key

Closes #23268

Signed-off-by: Pascal Paulis <ppaulis@gmail.com>
This commit is contained in:
Pascal Paulis 2024-02-05 10:36:31 +01:00 committed by GitHub
parent 0df5452507
commit 2785bbd29b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -227,6 +227,12 @@ show server_encoding;
create database keycloak with encoding 'UTF8'; create database keycloak with encoding 'UTF8';
---- ----
== Configuring MySQL server
Beginning with MySQL 8.0.30, MySQL supports generated invisible primary keys for any InnoDB table that is created without an explicit primary key (more information https://dev.mysql.com/doc/refman/8.0/en/create-table-gipks.html[here]).
If this feature is enabled, the database schema initialization and also migrations will fail with the error message `Multiple primary key defined (1068)`.
You then need to disable it by setting the parameter `sql_generate_invisible_primary_key` to `OFF` in your MySQL server configuration before installing or upgrading Keycloak.
== Changing database locking timeout in a cluster configuration == Changing database locking timeout in a cluster configuration
Because cluster nodes can boot concurrently, they take extra time for database actions. For example, a booting server instance may perform some database migration, importing, or first time initializations. A database lock prevents start actions from conflicting with each other when cluster nodes boot up concurrently. Because cluster nodes can boot concurrently, they take extra time for database actions. For example, a booting server instance may perform some database migration, importing, or first time initializations. A database lock prevents start actions from conflicting with each other when cluster nodes boot up concurrently.