share mysql data folder between linux and windows

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

share mysql data folder between linux and windows

Postby virtualj » 16. October 2006 22:09

I have a dual boot with windows and linux. On both I have xampp running and I configured the httpd.conf file so that they use the same httpdoc folder.
But I allso want them to use the same database.
I found that I need to change datadir in my.cnf
But in my linux install of xampp there is no datadir in the my.cnf file.
the only reference to the data dir was this:
Code: Select all
skip-innodb
innodb_data_home_dir = /opt/lampp/var/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/lampp/var/mysql/
innodb_log_arch_dir = /opt/lampp/var/mysql/

so I changed those to the mounted fat partition directory.
But when I restart MYSQL it still uses the old databases and datadir.

It looks like my.cnf is ignored.
Can anyone help me?

thanks
virtualj
 
Posts: 1
Joined: 16. October 2006 21:58

BUMP

Postby josejorge » 24. December 2006 05:51

I have the same problem, does anybodu know how to change the folder in which the MySQL databases are stored ??? Thanks beforehand ! :D
josejorge
 
Posts: 1
Joined: 24. December 2006 05:16

Re: BUMP

Postby jimwill » 02. April 2008 12:23

josejorge wrote:I have the same problem, does anybodu know how to change the folder in which the MySQL databases are stored ??? Thanks beforehand ! :D


No one knows how to do this :?: :?: :?:
Since 2006!!
I guess I may as well give up then, must not be do-able :!:

(Think I'll go play solitaire!)
jimwill
 
Posts: 1
Joined: 02. April 2008 12:14

Changing the xampp datadir

Postby florentin » 18. November 2008 11:37

When you start xampp on linux with "/opt/lampp/lampp start", you automatically set datadir to /opt/lampp/var/mysql and adding your own datadir to my.cnf won't help.

Not sure if you like this solution, but this is how i've done:

1. rename /opt/lampp/var/mysql to /opt/lampp/var/mysqlbk
2. create a symbolic link like that
ln -s /location/to/the/new/mysql/data /opt/lampp/var/mysql
where /location/to/the/new/mysql/data is your new mysql data directory (also used by the mysql from windows)
3. restart lampp: /opt/lampp/lampp restart

If you had a mysql root password in windows, you should be aware that you phpmyadmin from linux wont' work. Edit the /opt/lampp/phpmyadmin/config.inc.php and add your password there.
florentin
 
Posts: 1
Joined: 18. November 2008 11:26

Re: share mysql data folder between linux and windows

Postby AlZuwaga » 04. December 2008 04:19

Thanks florentin, your information was exelent for me :D
AlZuwaga
 
Posts: 1
Joined: 04. December 2008 04:13

Re: share mysql data folder between linux and windows

Postby mrodent » 28. October 2010 19:24

Dear all,

Don't know if this is any help.

Installed my MySQL as part of the XAMPP package

Turns out the configuration file for location of MySQL data is at
/opt/lampp/bin/mysql_config
... search for "ldata"

Maybe mysql_config can be found in other locations due to other installation processes... appears my.cnf is, er, ignored (?)
mrodent
 
Posts: 5
Joined: 28. October 2010 19:20

Re: share mysql data folder between linux and windows

Postby cpighin » 14. November 2010 16:27

Thanks florentin, your information helped my very much on having success; now I can manage my database under Ubuntu and Windows.

Claudio :D
cpighin
 
Posts: 8
Joined: 14. November 2010 16:23


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 23 guests