MySQL installation fails during database initialization step

I’m trying to set up MySQL Server on my Windows machine but running into issues during the installation process. The installer gets stuck when it tries to initialize the database and throws an error.

Initializing MySQL Server with --initialize-insecure flag...
Launching MySQL Server version 9.3.0...
Executing command: C:\Program Files\MySQL\MySQL Server 9.3\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 9.3\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
MySQL daemon process with ID 20112 completed with exit code -1073741819.
Unable to launch MySQL Server 9.3.0.
Database setup process failed.
Finished executing step: Setting up database (this might take some time)

The installation stops at this point and won’t continue. Has anyone seen this type of error before? What could be causing the database initialization to fail like this?

The exit code -1073741819 typically indicates a memory access violation or corrupted files, which can occur if security software interferes with the installation. I’ve faced similar issues before, and resolving it involved a few steps. Firstly, try disabling your antivirus temporarily and ensure you run the installer as an administrator. It’s also crucial to check that there is enough disk space in both the installation directory and the temp folder. In my case, completely uninstalling any previous MySQL installations through the MySQL Installer’s remove function and clearing leftover registry entries helped. Lastly, performing a fresh install resolved the issue. Security software, like Windows Defender, might block mysqld.exe from accessing necessary system resources at startup, which could lead to this problem.