Nextcloud version: 18.0.4
Operating system and version: Ubuntu Server 18.04.04 LTS
Apache or nginx version: Apache/2.4.29
PHP version: 7.2
The issue you are facing:
The user list “everyone” is empty when mysql.utf8mb4 is set to true in config/config.php
It works fine when I remove the line 'mysql.utf8mb4' => true,
in config.php.
Steps to replicate it:
- Setup database as explained here:
https://docs.nextcloud.com/server/18/admin_manual/configuration_database/linux_database_configuration.html
Specifically:
CREATE DATABASE nextdb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
- Install Nextcloud as usual
- Insert
'mysql.utf8mb4' => true,
into config/config.php
The output of your Nextcloud log in Admin > Logging:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT `uid`, `displayname` FROM `oc_users` `u` LEFT JOIN `oc_preferences` `p` ON (`userid` = `uid`) AND (`appid` = 'settings') AND (`configkey` = 'email') WHERE (`uid` COLLATE utf8mb4_general_ci LIKE ?) OR (`displayname` COLLATE utf8mb4_general_ci LIKE ?) OR (`configvalue` COLLATE utf8mb4_general_ci LIKE ?) ORDER BY `uid_lower` ASC LIMIT 500' with params ["%%", "%%", "%%"]: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8'
The output of your config.php file in /var/www/html/cloud/config
:
1 <?php
1 $CONFIG = array (
2 'instanceid' => '',
3 'passwordsalt' => '',
4 'secret' => '',
5 'trusted_domains' =>
6 array (
7 0 => 'localhost:8010',
8 ),
9 'trusted_proxies' =>
10 array (
11 0 => 'localhost',
12 ),
13 'datadirectory' => '/var/www/html/cloud/data',
14 'dbtype' => 'mysql',
15 'version' => '18.0.4.2',
16 'overwrite.cli.url' => 'http://localhost:8010/cloud',
17 'htaccess.RewriteBase' => '/cloud',
18 'dbname' => 'nextdb',
19 'dbhost' => 'localhost',
20 'dbport' => '',
21 'dbtableprefix' => 'oc_',
22 'dbuser' => 'next',
23 'dbpassword' => '',
24 'mysql.utf8mb4' => true,
25 'memcache.local' => '\\OC\\Memcache\\APCu',
26 'installed' => true,
27 );