Update error solved: Error SQL Duplicate entry for key 'idx_username'

Update error solved: Error SQL Duplicate entry for key 'idx_username'

The recent release of Joomla 3.9.16 includes the addition of a database index to the users table. If your Joomla website happens to have duplicate usernames, this index addition will fail and you will see an error as in the attached image. The rest of the update will typically succeed just fine. 

Should you have this error, you must first find and solve the duplicate username problems. Each username in your site should be unique, so you should either rename or remove duplicates. 

To find the duplicates you can run the following MySQL command (replace #_ with the prefix for your tables)

SELECT username FROM #__users GROUP BY username HAVING COUNT(*) > 1

Once you have solved that, then you can navigate to the database fix function and run it to add the missed index. To do that navigate to Extensions > Manage > Database and click the 'Fix' button.

If you experience any issues with this fix, please feel free to get in touch!

公司简介

 

自1996年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
备案号: 豫ICP备05004936号-1

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088

QQ:76257322

网站:800188.com

电邮:该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。