When initializing MySql, the following error message appears in the cmd command:
mysqld -initialize-insecure
The reason for the error: the system environment variable is not configured, or the system environment variable is configured incorrectly, so the mysqld command cannot be run. The operation of the cmd command requires system environment variables.
Solution: configure system environment variables
1. Advanced system settings in the computer: right click to start - find settings - open settings - enter advanced settings - click to view advanced system settings
2. Click Environment Variables
3. Create a new system variable
4. Create your mysql installation directory
5. Edit the path path
6. Set a new path
7. Test it
Note: If there is still no effect according to the above operations, you can choose to close the command prompt, then restart and enter the command to see if it is successful.