changing mysql datadir

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

changing mysql datadir

Postby korg » 22. April 2008 19:28

Hi,

I was wondering how to change the default mysql datadir. I noticed that the setting was not in /etc/my.cnf. I also noticed that the datadir seems to be set during startup when I issue ./lampp start, because checking my processes shows : .../opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql...

Is there a way to change this startup option or is there any file I can edit to change the datadir?

Also, after I change the datadir, can I simply move the files in the current datadir over and mysql should keep working?

Thanks
korg
 
Posts: 5
Joined: 22. April 2008 19:19

Postby korg » 07. May 2008 19:12

anyone?
korg
 
Posts: 5
Joined: 22. April 2008 19:19

Postby korg » 07. May 2008 22:58

i figured it out, in your lampp dir, in /etc/my.cnf, add a datadir=/path/to/new/datadir/

copy all the current files in /var/mysql into the new datadir

make sure to chown and chgrp -R the new folder to nobody

after that restart lampp and it should work
korg
 
Posts: 5
Joined: 22. April 2008 19:19


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 109 guests