You can change the default installation path, the data path, or both when you install MySQL server. After you have installed the server, the paths cannot be altered without removing and reinstalling the server instance.
change paths for MySQL server
Identify the MySQL server to change and enable theAdvanced Optionslink.
Navigate to theSelect Productspage by doing one of the following:
If this is aninitial setupof MySQL Installer, select the
Custom
setup type and click .If MySQL Installer is installed already, launch it from the Start menu and then click
from the dashboard.
ClickAvailable Products(seeLocating Products to Install.
to apply a filter on the product list shown inWith the server instance selected, use the arrow to move the selected server to theProducts To Be Installedlist.
Click the server to select it. When you select the server, theAdvanced Optionslink is enabled below the list of products to be installed (see the following figure).
ClickAdvanced Optionsto open a dialog box where you can enter alternative path names. After the path names are validated, click to continue with the configuration steps.