wormytux Posted February 14, 2008 Share Posted February 14, 2008 i am currently using xampp and i wnt to put my web files on a certain folder. my default folder of xampp is something like 'C:\xampp\htdocs\mysite\' and the default of mysql is 'C:\xampp\mysql'. the thing is, i want it to be in 'C:\mysite\' for my pages and 'C:\mysite\data\' for my database. but i dont know how will i do that. what should i do? helps and suggestions would be a great help. hoping for your replies. thanks... btw, my site is locally built and im connecting 2 machines (client-server of sort) via intranet... Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/ Share on other sites More sharing options...
wildteen88 Posted February 14, 2008 Share Posted February 14, 2008 I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost. Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467009 Share on other sites More sharing options...
NL_Rosko Posted February 14, 2008 Share Posted February 14, 2008 I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost. have a look at he my.cnf file, this can be editted. (mysql\bin\ folder) change the data folder to suite your needs. haven't tested is myself but should work apache has it's own config file, also edit his (apache\conf) Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467091 Share on other sites More sharing options...
wormytux Posted February 15, 2008 Author Share Posted February 15, 2008 eiiii, thanks you guys. ill try it out.... you've been a great help... thank you.... Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467297 Share on other sites More sharing options...
cyrixware Posted February 15, 2008 Share Posted February 15, 2008 Or try to download the new version of xammp 1.6 i think... after the installation the default directory is in c:\xampp... Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467402 Share on other sites More sharing options...
wormytux Posted February 15, 2008 Author Share Posted February 15, 2008 I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost. have a look at he my.cnf file, this can be editted. (mysql\bin\ folder) change the data folder to suite your needs. _*** i cant find my.cnf file in the folders. but i have found something else and that is 'winmysqladmin.exe' i did see 'my.ini' there but still cant figure out how to move my database from "C:\xampp\mysql\data\mysite" to "C:\mysite\data". please help.... ??? btw, im using xampp v1.6.3a.... help....??? haven't tested is myself but should work apache has it's own config file, also edit his (apache\conf) Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467616 Share on other sites More sharing options...
wormytux Posted February 15, 2008 Author Share Posted February 15, 2008 I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost. have a look at he my.cnf file, this can be editted. (mysql\bin\ folder) change the data folder to suite your needs. haven't tested is myself but should work apache has it's own config file, also edit his (apache\conf) _*** i cant find my.cnf file in the folders. but i have found something else and that is 'winmysqladmin.exe' i did see 'my.ini' there but still cant figure out how to move my database from "C:\xampp\mysql\data\mysite" to "C:\mysite\data". please help.... ??? btw, im using xampp v1.6.3a.... help....??? Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-467765 Share on other sites More sharing options...
NL_Rosko Posted February 16, 2008 Share Posted February 16, 2008 I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost. have a look at he my.cnf file, this can be editted. (mysql\bin\ folder) change the data folder to suite your needs. haven't tested is myself but should work apache has it's own config file, also edit his (apache\conf) _*** i cant find my.cnf file in the folders. but i have found something else and that is 'winmysqladmin.exe' i did see 'my.ini' there but still cant figure out how to move my database from "C:\xampp\mysql\data\mysite" to "C:\mysite\data". please help.... ??? btw, im using xampp v1.6.3a.... help....??? in the folder i mentioned should be an MY file (in my case it looks like an speeddial file) open it with editor of choice. It looks like this: i've recplaced the data dir with another data dir and copied the files over. It worked. # The following options will be passed to all MySQL clients [client] # password = your_password port = 3306 socket = mysql # Here follows entries for some specific programs # The MySQL server [mysqld] basedir="D:/xampp/mysql" tmpdir="D:/xampp/tmp" #datadir="D:/xampp/mysql/data" datadir="D:/data" Quote Link to comment https://forums.phpfreaks.com/topic/91026-helpxampp-data-directory-path/#findComment-468253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.