Check out example codes for "umgebungsvariable setzen für mysql 8". It will help you in understanding the concepts better.

Code Example 1

For windows users only!
I had a lot of trouble for this one, but I found the solution.
Visit this page: https://overiq.com/installing-mysql-windows-linux-and-mac/

And then follow the steps, but instead of putting this:
C:\Program Files\MySQL\MySQL Server x.y\bin\mysql.exe

Put this:
C:\Program Files\MySQL\MySQL Server x.y\bin

Code Example 2

For windows users -
The SQL Workbench 8 Installation changed the default path 
from
C:\Program Files\MySQL\MySQL Server x.y\bin\mysql.exe

to
C:\Program Files\MySQL\MySQL Server x.y\ 
The mysql.exe is now no longer located within a \bin folder.

Learn ReactJs, React Native from akashmittal.com