I would like to install MySQL in the D: drive instead of my C: drive and subsequently have all my databases stored in a folder that should look like this D:\ProgramData\MySQL\MySQL Server %VERSION%
I wasn't able to find satisfactory answers:
And in the MySQL documentation section, the only mini-guide is this:
Is it feasible to install MySQL in D: without incurring in major or even minor problems down the road? How can I conduct the installation to avoid possible pains in the future?
In the latest version of MySQL Installer, the "Advanced Options" link as described here is no longer there. However, you can trick the installer into giving you extra options where you can change the Install Directory and the Data Directory.
If you are installing MySQL Server 8.0.22, for example, the installer will try to create the folder C:\Program Files\MySQL\MySQL Server 8.0. But if you create this folder before opening the installer, then when you go to step 2 in the installer, you will be presented with "Path Conflicts" options where you can specify different directories.
Click here to see a screenshot of the secret Step 2
Note: This same approach works for MySQL Workbench. The folder you would create is C:\Program Files\MySQL\MySQL Workbench 8.0 CE.