Author Topic: Upgrade roundcube version mysql problem Duplicate entry  (Read 1497 times)

Offline itiloo

  • Newbie
  • *
  • Posts: 2
Upgrade roundcube version mysql problem Duplicate entry
« on: April 26, 2023, 09:16:46 AM »
Hi:
I am upgrading from 1.4.13 to 1.5.3
I have mysql 8.

Copying files to target location....htaccess.new
done.

NOTICE: New .htaccess file saved as .htaccess.new.

Running update script at target...
Executing database schema update.
ERROR: Error in DDL upgrade 2020020101: [1062] Duplicate entry 'xxxxxxxx@xxxxxxxxx' for key 'users.username'
Updating database schema (2020020101)... [FAILED]
All done.

In the ./SQL/mysql/2020020101.sql file, this sentence do that error:
"ALTER TABLE `users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

I see in mysql username table, duplicates same entries, one in lowercase and other in uppercase, by users which login in roundcube sometimes with lowercase others with uppercase.

Any solution?.

Thanks.



Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: Upgrade roundcube version mysql problem Duplicate entry
« Reply #1 on: April 27, 2023, 03:43:45 AM »
you need to clean up your users table, remove the duplicates.

you might also look at setting
Code: [Select]
// Forces conversion of logins to lower case.
// 0 - disabled, 1 - only domain part, 2 - domain and local part.
// If users authentication is case-insensitive this must be enabled.
// Note: After enabling it all user records need to be updated, e.g. with query:
//       UPDATE users SET username = LOWER(username);
$config['login_lc'] = 2;
in your rounducbe config to prevent the situation in the future.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline itiloo

  • Newbie
  • *
  • Posts: 2
Re: Upgrade roundcube version mysql problem Duplicate entry
« Reply #2 on: April 27, 2023, 04:22:26 AM »
Thank you so much for your help.