diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index c7dd66b5f..9de5880df 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -48,3 +48,18 @@ The following is currently required if you're running Nextcloud together with a * Disabled or BINLOG_FORMAT = MIXED configured Binary Logging (See: :ref:`db-binlog-label`) * InnoDB storage engine (MyISAM is not supported) * "READ COMMITED" transaction isolation level (See: :ref:`db-transaction-label`) + +Emoji (UTF8 4-byte) support with MySQL / MariaDB +================================================ +If you want to use UTF8 4-byte characters such as Emojis on your server, the database needs to be created with character set ``utf8mb4`` and collate ``utf8mb4_general_ci``, e.g.:: + + CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +Additionally the following InnoDB settings need to be set:: + + [mysqld] + innodb_large_prefix=true + innodb_file_format=barracuda + innodb_file_per_table=true + +See :doc:`../maintenance/mysql_4byte_support` for more information. diff --git a/admin_manual/maintenance/index.rst b/admin_manual/maintenance/index.rst index 320da6c37..0927fe94f 100644 --- a/admin_manual/maintenance/index.rst +++ b/admin_manual/maintenance/index.rst @@ -13,3 +13,4 @@ Maintenance manual_upgrade restore migrating + mysql_4byte_support diff --git a/admin_manual/maintenance/mysql_4byte_support.rst b/admin_manual/maintenance/mysql_4byte_support.rst new file mode 100644 index 000000000..f2aea9b9e --- /dev/null +++ b/admin_manual/maintenance/mysql_4byte_support.rst @@ -0,0 +1,31 @@ +============================= +Enabling MySQL 4-byte support +============================= + +.. note:: This feature is currently **experimental**. + +In order to use Emojis on your Nextcloud server with a MySQL database, the +installation needs to be tweaked a bit. + +1. Update your Nextcloud server to Nextcloud 11 or later. +2. Make sure the following InnoDB settings are set on your MySQL server:: + + [mysqld] + innodb_large_prefix=true + innodb_file_format=barracuda + innodb_file_per_table=true + +3. Restart the MySQL server in case you changed the configuration in step 2. +4. Change your databases character set and collation:: + + ALTER DATABASE nextcloud CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +5. Set the ``mysql.utf8mb4`` config to true in your config.php:: + + $ sudo -u www-data occ config:system:set mysql.utf8mb4 --type boolean --value="true" + +6. Convert all existing tables to the new collation by running the repair step:: + + $ sudo -u www-data occ maintenance:repair + +Now you should be able to use emojis like ``🎉`` in your file names, calendar events, comments and many more.