Jump to content

help(xampp, data directory, path)??


wormytux

Recommended Posts

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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....???

Link to comment
Share on other sites

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"

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.