Home > Database > Mysql Tutorial > body text

Get MySQL path in command prompt

王林
Release: 2023-09-07 14:17:01
forward
626 people have browsed it

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
Copy after login
Copy after login

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

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

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
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 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!

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