how to change location of database files?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

how to change location of database files?

Postby killerwhale65 » 17. August 2008 11:53

hi,

I am currently using a dualboot system Ubuntu - windows XP. I have XAMPP installed under windows, but i would like to access the database from under linux as well. In linux, i can change the location of the website-files, but not the database files. I want to work with the same database both in windows and linux, so i would have to alter the location XAMPP linux looks for its database files. But how do i do that?

Thanks!

Matt
killerwhale65
 
Posts: 17
Joined: 21. July 2006 18:48

Postby Nobbie » 17. August 2008 14:50

>But how do i do that?

Edit the MySQL Configuration File (my.cnf) and supply the DataDir-Value as needed.

For example, if your WindowsXP NTFS(?) Filesystem is mounted to /media/c, and mysql is installed in c:/mysql, you shoul supply the following value to DataDir:

Code: Select all
DataDir = /media/c/mysql/data


Be sure that the user which runs the mysqld server process have sufficient rights (read and write) to change the data in /media/c/mysql/data. This depends on the mount options and on the NTFS driver of Linux.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Postby killerwhale65 » 19. August 2008 15:09

thanks, i will try that!
killerwhale65
 
Posts: 17
Joined: 21. July 2006 18:48

Postby killerwhale65 » 21. August 2008 16:33

hello again,

could you tell me where to find my.cnf? I only find one in /opt/lampp/etc, but that seems to be a sample file and not the actual one, and it does not contain "datadir".

thanks!

Matt
killerwhale65
 
Posts: 17
Joined: 21. July 2006 18:48

Postby Dave_L » 22. August 2008 16:47

That probably is the actual file. Add the datadir setting to the [mysqld] section.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43


Return to XAMPP for Windows

Who is online

Users browsing this forum: hthnightwolf and 64 guests