If we install in the win10 system
AfterMySQL, if there is no environment variable, you must enter the MySQL installation directory when using the command line to perform MySQL operation. So, it feels very troublesome to operate like this. What should I do? Below, Xiao Du organizes how to configure the MySQL environment variable under Win10. Because the content is simple and easy to understand, and has certain reference value, interested friends may wish to take a look!
1. After installing mysql, you need to configure environment variables (win 10)
Select “My Computer”, right-click, select the system variables in “Properties-> Advanced-> Environment variables, and set the following corresponding values for the two system variables of MySQL_HOME and PATH The variables directly edit the variable, pay attention to only add or delete; if the variable does not exist, then edit it after the new.)
Since there is no here, so create a new environment variable mysql_home
mysql_home = d: \ app \ mysql (the directory selects its own installation directory)
(Pay attention here, if it is a new variable content for a certain existing variable, you must enter the score in the English input method before entering the variable content)
2. After the new environment variable is built, find PATH in the environment variable, click edit, click the newly built in the pop -up box, create a new environment variable
PATH =%mysql_home%\ bin (add%mysql_home%\ bin to the path path)
3, enter%mysql_home%\ bin, then click OK, remember that there must be 3 certainty
If you click Edit Path, it is like this
Need to add at the end of the variable value;%mysql_home%\ bin (mysql_home%\ bin with the score in English state)
After the editor is completed, the configuration is complete
After
Configuration, we can enter in CMD
mysql -u root -p
Enter the password after Enter
This article about how to configure the MySQL environment variable under Win10 is the end. I believe that friends have a deeper understanding after reading it. If you still want to learn more about related knowledge, you can pay attention to the Moduyun Industry Information Channel. More related knowledge is waiting for you to learn, thank you for reading!