Install MySQL 8 on Windows 7

Step 1. Download MySQL 8 zip package

Open in your favorite browser. For most people, Windows (x86, 64-bit), ZIP Archive is the best choice.

If you want a minimal installation, you can delete all PDB files in bin folder in the ZIP Archive which save a lot of disk space. These files are used by WinDbg or Visual Studio for debugging mysqld.exe. Most people don't need them, it's safe to delete them.

The include and lib can also be deleted if you aren't developing C/C++ application that depends on MySQL header files and libs.

Step 2. Install VC++ 2019 redistributable

Run command mysqld --initialize --console you may get an error message says the vcruntime140_1.dll is missing. The solution is to install VC++ 2019 redistributable. You can download it from Microsoft download page or get it from Microsoft Visual C++ 2015-2019 Redistributable.

Step 3. Initialize and install mysql service

Open a cmd window and change the working directory as bin folder under MySQL unpacked folder and run the following commands:

mysqld --initialize --console
mysqld -install mysql
mysql -u root -p-)wq3ixr)EKr
alter user 'root'@'localhost' identified by '';

The initial password is a temporary password generated by the first command, you can find it in the output of the first command. The last command change the temporary password to your own password, here we use empty password.

To start/stop the service or remove the mysql service, execute these commands:

net start mysql
net stop mysql
mysqld -remove mysql