Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public function achieve(Environment $environment): Environment
$db = \ilDBWrapperFactory::getWrapper($this->config->getType());
$db->initFromIniFile($c->toMockIniFile());

if (!$db->createDatabase($c->getDatabase(), "utf8", $c->getCollation())) {
$charset = ilDBConstants::isUTF8MB4Collation($c->getCollation()) ? 'utf8mb4' : 'utf8';
if (!$db->createDatabase($c->getDatabase(), $charset, $c->getCollation())) {
throw new UnachievableException(
"Database cannot be created."
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class ilDatabaseSetupConfig implements Config
{
public const DEFAULT_COLLATION = "utf8_general_ci";
public const DEFAULT_COLLATION = \ilDBConstants::MYSQL_COLLATION_UTF8MB4_520;
public const DEFAULT_PATH_TO_DB_DUMP = "./components/ILIAS/Database/sql/ilias3.sql";

protected string $type;
Expand Down
10 changes: 3 additions & 7 deletions docs/configuration/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,11 @@ On Debian/Ubuntu execute:
apt install mariadb-server
```

> [!NOTE]
> Please note that installing ILIAS in utf8mb4-collations is currently not supported!
> ILIAS supports utf8-collations with 3 bytes per character, such as `utf8_general_ci`, only.

We **strongly recommend** using MariaDB with the following settings:

* InnoDB storage engine (default)
* `character-set-server` = `utf8mb3`
* `collation-server` = `utf8mb3_general_ci`
* `character-set-server` = `utf8mb4`
* `collation-server` = `utf8mb4_unicode_520_ci`
* `join_buffer_size` > `128K`
* `table_open_cache` > `400`
* `innodb_buffer_pool_size` > `2G` (depending on DB size)
Expand All @@ -279,7 +275,7 @@ systemctl restart mariadb.service
We recommend creating a dedicated database user for ILIAS:

```shell
mysql -e "CREATE DATABASE ilias CHARACTER SET utf8 COLLATE utf8_general_ci;"
mysql -e "CREATE DATABASE ilias CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;"
mysql -e "CREATE USER 'ilias'@'localhost' IDENTIFIED BY '<db-password>';"
mysql -e "GRANT LOCK TABLES on *.* TO 'ilias'@'localhost';"
mysql -e "GRANT ALL PRIVILEGES ON ilias.* TO 'ilias'@'localhost';"
Expand Down
Loading