mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Add docs about MySQL 4-byte support
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -13,3 +13,4 @@ Maintenance
|
||||
manual_upgrade
|
||||
restore
|
||||
migrating
|
||||
mysql_4byte_support
|
||||
|
||||
31
admin_manual/maintenance/mysql_4byte_support.rst
Normal file
31
admin_manual/maintenance/mysql_4byte_support.rst
Normal file
@@ -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.
|
||||
Reference in New Issue
Block a user