Home > Database > Mysql Tutorial > Add MySQL to Windows path

Add MySQL to Windows path

王林
Release: 2023-08-31 10:37:01
forward
1272 people have browsed it

Environment variables can be set at the command prompt. This is done to affect the current invocation of the command handler, or is set permanently to affect future invocations. To set variables permanently, you can set them in the startup file or use the interface provided by the system. You'll need to consult your command interpreter's documentation for specific details.

To specify a value for an environment variable, you need to use command processor-related syntax.

The command to set environment variables can be executed in the command prompt and takes effect immediately, but the settings will only be maintained during the user login. Once you log out, changes will be lost.

If the MySQL program is installed in the /usr/local/mysql/bin directory, and the user wants to call these programs easily, the value of the PATH environment variable can be set to include this directory.

Before trying to add MySQL to the Windows path, make sure MySQL is installed correctly.

Add MySQL to the path

Here are the steps to add MySQL to the path:

Step 1 - Locate the mysql.exe file. We found it at:

C:\Program Files\MySQL\MySQL Server 8.0\bin
Copy after login
Copy after login

Step 2 - Press "Start" and enter "Environment Variables". Click -

将 MySQL 添加到 Windows 路径

Step 3 - Under Advanced, click Environment Variables-

将 MySQL 添加到 Windows 路径

Step 5 - Click "New" -

Add MySQL to Windows path

Add the same path and click "OK" -

C:\Program Files\MySQL\MySQL Server 8.0\bin
Copy after login
Copy after login

The new PATH value should be available to any new command shells that the user now opens. This will allow the user to invoke any MySQL executable program by typing its name from any directory on the system at a DOS prompt.

The above is the detailed content of Add MySQL to Windows path. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template