MySQL Shell 8.0  /  ...  /  Module Search Path Environment Variables

13.2.1 Module Search Path Environment Variables

You can add folders to the module search path by adding them to the appropriate language-specific module search path environment variable. MySQL Shell includes these folders in the module search paths when you start or restart MySQL Shell. If you want to add to the search path immediately, modify the sys.path variable directly.

For JavaScript, add folders to the MYSQLSH_JS_MODULE_PATH environment variable. The value of this variable is a list of paths separated by a semicolon character.

For Python, add folders to the PYTHONPATH environment variable. The value of this variable is a list of paths separated by a semicolon character on Windows platforms, or by a colon character on Unix platforms.

For JavaScript, folders added to the environment variable are placed at the end of the sys.path variable value, and for Python, they are placed at the start.

Note that Python's behavior for loading modules is not controlled by MySQL Shell; the normal import behaviors for Python apply.