# Environment Variables (Windows)

Jump to: navigation, search

## Contents

For using console commands for PHP ans MySQL in a comfortable way, some settings in the environment variables should be done. This document describes how to do this.

## Tips for this Document

• Please, read this manual completely and work through the single installation steps one after another.

## Figure out Paths

Please try to figure out in which paths of your Windows installation the following files are located:

• php.exe
• mysql.exe

This document uses this paths as an example for the description:

• C:\Program Files (x86)\PHP\php-5.6.30\php.exe
• C:\Program Files\MariaDB 10.1\bin\mysql.exe

## Enter Environmental Variables

1. Press the key combination "Windows + R" to start the input request
2. Start the program "SystemPropertiesAdvanced.exe"
3. Click at "Environment Variables"

4. Open the variable "Path" at "System variables" with a double click

5. With Windows 2012: In the line "Value of Variables", add the paths to php.exe and mysql.exe, separated by semicolon, directly at the beginning of the line. Regarding the path example, this would be "C:\Program Files (x86)\PHP\php-5.6.30\;C:\Program Files\MariaDB 10.1\bin\;"

6. Windows 2016 and above: Add two new entries with their respective pathnames

7. Close all windows by clicking on "OK"
8. Restart the command line

Now you should be able to call up the commands "php" and "mysql" without problems in the command line.