I want to sync (share) an xampp MYSQL database over several

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

I want to sync (share) an xampp MYSQL database over several

Postby kenoli » 21. February 2017 04:06

I want to sync (share) an xampp MYSQL database over several computers. My strategy here is to move the database to a DropBox directory so it can be used on multiple machines. I have found a clear description of how to do this on Windows, but names and locations of the mysql configuration files (my.ini on Windows, my.cnf on mac) are different. The config file settings are different enough that I couldn't get it to work on the mac simply by comparing the changes made in the Windows file. For example there is a datadir setting in the Windoes my.ini file and not in the mac my.cnf file.

I tried moving the MYSQL database and changing the my.cnf file as it made sense to me to direct the software to the new location and was unable to get it to work. I also tried leaving the config files alone and attempting to redirect xampp with a symlink to the data files in DropBox. In neither case could I get xampp to fire up mysql.

I have had inconsistent success using symlinks with xampp, but I can usually use them to redirect xampp to a new php localhost directory. In this case I couldn't get it to do this with mysql.

Does anyone know how to do this, i.e. which setting in the my.cnf file need to be redirected (I've tried about every variation I could think of) or how to get it to follow a smylink to the alternative directory?

Thanks,

--Kenoli
kenoli
 
Posts: 25
Joined: 11. May 2009 19:06

Re: I want to sync (share) an xampp MYSQL database over seve

Postby Nobbie » 21. February 2017 12:46

kenoli wrote:I want to sync (share) an xampp MYSQL database over several computers. My strategy here is to move the database to a DropBox directory so it can be used on multiple machines.


NO!! If you do so, you DEFINATELY will destroy all your data. Dropbox is the worst option to install a database. DONT DO THAT!

As MySQL already is a server, you may simply serve all data from one Server in your LAN. Or (if you have) from a NAS, which runs MySQL (my QNAP120 for example comes with a MySQL installation). But NEVER EVER use a cloud, i.e. Dropbox or similar. Think about a client, which makes (local!!) changes to the Database, but for any reason it is not connected to the Dropbox server (this happens quite often). The next day, you access the Database with another client and do some changes. And finally you switch on the first client, now it is connecting to your Dropbox. But: the local copy of the Dropbox is totally different than the Servers data - what should Dropbox do? How should Dropbox synchronize the Data? From where to where? And which data? Dropbox CANNOT put single instances of your rows and tables, Dropbox does not know anything about SQL, Tables and Databases. Dropbox knows files only.

What should Dropbox do? It will copy the whole data from somewhere to somewhere - based on files, not based on SQL tables. A horrific scenario! Or it will copy the index file, without synching the database. Or or or ... absolutely deadly!!
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 40 guests