Users can not login (users disabled) but they are not disabled

Hello,
I have a problem with my instance of Nexcloud. Users can not login (users disabled).
Nextcloud
Version: 15.0.8.1
PHP
Version: 7.3.10
Database
Type: mysql
Version: 10.0.38
Apache
2.4.18 (Ubuntu)
When I go to the users section, I see that:

but I see them in the group section and I can use “Impersonate” on their account.

In my logs :
[core] Error: 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 OFFSET 500’ with params ["%%", “%%”, “%%”]:

SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8' at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 128
    convertException("An exception oc ... '", Doctrine\DBAL\Dr ... ]})
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 855
    driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT `uid`, ` ... 0", {1: "%%",2: "%%",3: "%%"})
 2. /var/www/nextcloud/lib/private/DB/Connection.php line 195
    executeQuery("SELECT `uid`, ` ... 0", {1: "%%",2: "%%",3: "%%"}, {1: 2,2: 2,3: 2}, null)
 3. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 206
    executeQuery("SELECT `uid`, ` ... 0", {1: "%%",2: "%%",3: "%%"}, {1: 2,2: 2,3: 2})
 4. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    execute()
 5. /var/www/nextcloud/lib/private/User/Database.php line 282
    execute()
 6. /var/www/nextcloud/lib/private/User/Database.php line 383
    getDisplayNames("", 500, "500")
 7. /var/www/nextcloud/lib/private/User/Manager.php line 229
    getUsers("", 500, "500")
 8. /var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php line 101
    search("", 500, "500")
 9. /var/www/nextcloud/lib/private/BackgroundJob/Job.php line 61
    run(null)
10. /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php line 55
    execute(OC\BackgroundJob\JobList {}, OC\Log {})
11. /var/www/nextcloud/cron.php line 123
    execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2019-10-18T09:30:01+00:00

I followed these instructions : mysql-4-byte-support

Thank you for your help.

If I search for the

I’ve searched for the above error in previous forum postings and found these matches which might help you solving the problem too:

1 Like

thank you for your reply.
I solved the problem by doing this command for disabled utf8mb4
sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="false"

and reppair with occ maintenance:repair

A+