Home  >  Article  >  Database  >  Get MySQL path in command prompt

Get MySQL path in command prompt

王林
王林forward
2023-09-07 14:17:01600browse

Let us understand how to get the MySQL path in the command prompt -

In order to facilitate calling the MySQL program, you can add the path name of the MySQL bin directory to the Windows system PATH environment variable.

This can be done using the steps mentioned below -

Make sure that MySQL is properly installed before trying to add MySQL to the Windows path.

Add MySQL to the path

Here are the steps to add MySQL to the path -

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

C:\Program Files\MySQL\MySQL Server 8.0\bin

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

在命令提示符中获取 MySQL 路径 p>

Step 3 - Under Advanced, click Environment Variables-

在命令提示符中获取 MySQL 路径

Step 5 - Click "New" -

Get MySQL path in command prompt

Add the same path and click "OK" -

C:\Program Files\MySQL\MySQL Server 8.0\bin

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 at a DOS prompt in any directory on the system.

This means the user does not have to provide the path. This includes the server, mysql client, and all MySQL command-line utilities such as mysqladmin and mysqldump.

If the user is running multiple MySQL servers, the MySQL bin directory should not be added to the Windows PATH on the same machine.

The above is the detailed content of Get MySQL path in command prompt. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete