How do I transfer MySQL to a new Windows workstation?

Step 1

Copy the MySQL installation folder from another workstation:
2023-06-02--00-44-58

dev.mysql.com/doc/refman/8.0/en/windows-extract-archive.html

Step 2

Copy the MySQL data folder from another workstation:
2023-06-02--01-01-02
https://dev.mysql.com/doc/refman/8.0/en/windows-extract-archive.html

Step 3

Add MySQL to PATH:
2023-06-02--01-10-28
dev.mysql.com/doc/refman/8.0/en/mysql-installation-windows-path.html

Step 4

Install MySQL as a Windows service:

mysqld --install-manual MySQL --defaults-file="C:\server\mysql\ini\my.ini"

2023-06-07--16-56-17
How to fix Ā«Failed to install the serviceĀ» on mysqld --install?

Step 5. Testing the service

5.1.

net start MySQL

2023-06-07--17-01-52

5.2.

net stop MySQL && net start MySQL

2023-06-07--17-03-22

5.3.

mysql

2023-06-07--17-04-49