After installing MySQL, if you do not configure environment variables, you have to go to the mysql/bin directory every time to operate. The following article will introduce to you how to configure environment variables. I hope it will be helpful to you. .
MySQL steps to configure environment variables:
1. Right-click [My Computer] and select [Properties]
2. Select [Advanced System Settings] on the left
3. Click [Environment Variables] in the lower right corner of the pop-up window 】
4. Click New, enter mysql_home as the variable name in the pop-up window, and enter your mysql installation path as the variable value, as shown in the figure:
5. Edit the Path system variable
In the system variables, find the Path variable, click the "Edit" button, we will;%MYSQL_HOME%\bin Add to the path variable (usually placed at the end)
Note: If there are other configurations in front, be sure to add an English semicolon (half-width) in front.
6. Then open cmd and you can enter commands directly at any location without locating to the bin directory
Because the bin directory has been added to the environment variable, the system will search for it by itself. At this time, we can open the mysql command prompt at any location, such as the root directory of drive D, by typing: mysql -u root -p.
The above is the detailed content of How to configure environment variables in MySQL?. For more information, please follow other related articles on the PHP Chinese website!