

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Adding MySQL to Windows Path
Environment variables can be set at the command prompt. This is done to affect the current invocation of the command processor, or to permanently set to affect the future invocations. To set a variable permanently, it can be set in a startup file or with the help of the interface provided by the system for the same purpose. The documentation of the command interpreter needs to be consulted for specific details.
To specify a value for an environment variable, the syntax relevant for the command processor needs to be used.
The command to set environment variables can be executed at the command prompt which will take effect immediately, but the settings will last as long as the user is logged in. Once they log out, the changes are lost.
If the MySQL programs are installed in /usr/local/mysql/bin and the user wishes to make it easy to invoke these programs, the value of the PATH environment variable can be set to include that directory.
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.
- Related Questions & Answers
- How to set your python path on Windows?
- How to Set Temporary Path of JDK in Windows?
- How to Set Permanent Path of JDK in Windows?
- Upgrading MySQL on Windows
- Installing MySQL on Microsoft Windows
- Adding unique constraint to ALTER TABLE in MySQL
- MySQL command line client for Windows?
- Getting MySQL path in command prompt
- How to find MySQL my.cnf on my windows computer?
- Adding new enum column to an existing MySQL table?
- Adding integers from a variable to a MySQL column?
- ALTER table by adding AUTOINCREMENT in MySQL?
- Adding a day to a DATETIME format value in MySQL?
- Extracting filenames from a path in MySQL?
- Microsoft Emergency Path for RCE (Remote Code Execution) in Windows Malware Scanner (CVE-2017-0290)