
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Getting MySQL path in command prompt
Let us understand how to get the MySQL path in the command prompt −
To invoke MySQL programs easily, the path name of the MySQL bin directory can be added to the Windows system PATH environment variable.
This can be done using the below mentioned steps −
Before trying to add MySQL to Windows path, ensure that MySQL has been installed properly.
Add MySQL to Path
Below are the steps to add MySQL to path −
Step1 − Locate the mysql.exe file. We found in the following location −
C:\Program Files\MySQL\MySQL Server 8.0\bin
Step 2 − Press Start and type “Environment Variables”. Click −
Step 3 − Under ‘Advanced’, click on ‘Environment Variables’ −
Step 4 − Locate the ‘System variables’ and double-click on “Path” −
Step 5 − Click on “New” −
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 shell the user opens now. This will allow the user to invoke any MySQL executable program by typing its name at the DOS prompt from any directory on the system.
This means the user won’t have to supply the path. This includes the servers, the mysql client, and all MySQL command-line utilities such as mysqladmin and mysqldump.
The MySQL bin directory shouldn’t be added to the Windows PATH if the user is running multiple MySQL servers on the same machine.
- Related Articles
- Print structured MySQL SELECT at command prompt
- How can I execute JavaScript at the command prompt?
- How to run PowerShell commands from the command prompt?
- How to run a JAR file through command prompt in java?
- How to run a PowerShell script from the command prompt?
- How to install a windows service using windows command prompt in C#?
- How do we print a variable at the MongoDB command prompt?
- How to compile & run a Java program using Command Prompt?\n
- How to use Split-Path command in PowerShell?
- How to Get the Path of a Linux Command?
- JavaScript Prompt Example
- Prompt mode in 8085 Microprocessor
- MySQL's DESCRIBE command?
- MySQL command to copy table?
- The MySQL Command-Line Client
