Reveller wrote:I have installed XAMPP on my C-drive. Hence, Apache htdocs is located at c:\program files\xampp\htdocs and MySQL databases in c:\program files\xampp\mysql\data.
First of all, it is not a good idea to install XAMPP into a folder with a space in the name -
Program Files being such a folder which is not recommended - install to the root of a drive or partition like C:\ then XAMPP will be installed to C:\xampp folder. Spaces in folder names may give you some headaches down the track.
Reveller wrote:I have created a separate partition D. I now would like to store htdocs and MySQL data on the D-drive:
Is this possible, and if so, how do I have to configure this?
Your help would be greatly appreciated!
You can tell Apache where the DocumentRoot folder is in the
xampp\apache\conf\httpd.conf file:
DocumentRoot "D:/htdocs"<Directory "D:/htdocs">Save the file and restart Apache.
Also check in the
xampp\apache\conf\extra folder in any of the other conf files that may point to the
C:\Program Files\xampp\htdocs folder and change them to the new location, save and restart as above.
The MySQL data is stored in
xampp\mysql\data folder which can be copied and pasted in the new location
D:\mysql_dataYou now have to tell MySQL where to look for this folder.
Open
xampp\mysql\bin folder and look for the
my.ini file or it may just look like a shortcut
my which you drag into an open text editor.
Look for this line and edit accordingly:
datadir="C:/xampp/mysql/data" <--this path is from my default installation
Edit so it looks like this:
datadir="D:/mysql_data"Check the rest of the file for any entries that may need to be edited to reflect the new location of the data folder.
Save the file and restart Apache and MySQL.
Hope this helps and points you in the right direction.