Recently I faced the same issue saying
database Engine recovery failed while installing SQL server 2019 developer version on Windows 11
After so many trial and error methods, I was able to install SQL server on Windows 11.
- Uninstall all the SQL instances One by One ----goto--Control panel - uninstall a program - Microsoft SQL server(64 Bit) - select remove option, select the particular instance, and uninstall
- Repeat the same process till you uninstall all instances. Goto C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER (MSSQLSERVER indicates instances). Should not have any instances like this ex: MSSQL15.MSSQLSERVER.
- I know it doesn't make sense still I uninstalled Visual Studio 2022 as well - it may be optional I just wanted to install SQL.
- Restart the Computer (you must)
- Downloaded SQL server 2019 developer version and run as administrator choose Basic installation process.
https://www.microsoft.com/en-us/sql-server/sql-server-downloads(SQL2019-SSEI-Dev)
- İnstall ssms as well
Download SQL Server Management Studio (SSMS) - SQL Server Management Studio (SSMS) -- Free Download for SQL Server
Management Studio (SSMS) 18.12.1 (SSMS-Setup-ENU).
- Restart the Computer again and launch Microsoft SQL server management 2019.
- Hope it helps. Thank you.