Successfully resolved: 'mysqld' is not recognized as an internal or external command, operable program or batch file.

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.

Guess you like

Origin blog.csdn.net/m0_74890428/article/details/127718797