Syncing (sharing) xampp mysql database over multiple machines on mac Sierra - mysql

I want to sync (share) A 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 the location of the database in the XAMPP directory and the names and locations of the mysql configuration files (my.ini on Windows, my.cnf on mac) are different. The config file directives are different enough that I couldn't get it to work on the mac simply by comparing the changes made in the Windows 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 along and attempting to redirect xampp with a symlink in the directory where it looked for the database folder. In neither case could I get xampp to fire up mysql.
I have had inconsistent success using symlinks with xampp, using them primarily 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 in advance for any help.
--Kenoli

if you are on a Local Area Network you can simply use one of your PCs as a mysql server and connect to the database using the local IP address. If not, I solved this using Hamachi, and using the Hamachi ip address of the pc you want to use as a server. I know this is not a direct response about the symlinks and DropBox, but it solves the problem.

Related

Creating a conf file for a web server

For my web database I am trying to create a webserver so I need to make a conf file. When I try to edit my conf file and save it wont let me and says permission denied. I have already given myself read and write access, but I still don't have access to the edit the file. Here is the link to the resource I am using to set up my webserver : https://github.com/orsenthil/adminer-on-mac
I've been working with local web servers and mysql on Mac for over 15 years, so this recommendation is coming from that experience.
OS X updates will destroy your local web development environment every time you do a major OS update... Don't use the built in Apache, PHP and MySQL. Use Homebrew to install independent web server components.
Now to your problems:
/etc/hosts is a file not a directory. Each line is a separate record. The line they gave 127.0.0.1 apache.local just means that your local computer will be accessible from http://apache.local. This hosts file can be used to avoid DNS lookups for any website.
The conf file you are referring to is the Apache VirtualHost file? OS X is very protective about files in etc. Have you tried sudo? If you change the permissions to your user, Apache may not be able to function.

I installed XAMP on Mac: I found htdocs, where do I find the folders in my localhost web browser?

I opened the localhost:8080/phpmyadmin in my browser and created a new database. Then I located the XAMP app from my mac application folder to find "htdocs". Inside I found the other "my.cnf" "php.ini" "proftpd.conf" and "httpd.conf" files. I opened each one of them to find my new database folder or the other default folders and none of it is their.
The other Youtube videos show it is located just under the htdocs folder, but none of the databases are their. How do I locate my database?
Also if someone can answer this, can I move that folder into my desktop and work from their?
You could theoretically move the folder to your desktop. It is not recommended to do so, as the desktop is where you most likely have all your important files, if you are a typical user. The database should be stored in /Applications/XAMPP/xamppfiles/var/mysql
I believe that you are using macOS, as described by the title, and as such, that is where XAMPP should be storing your database files.
Try to use MAMP . I think its better to use MAMP for MAC rather xampp.
https://www.mamp.info/en/downloads/
If you are still using xampp.
Try to find your databases under
xampp\mysql\data ..
Thanks.

Neo4j doesn't obey my database location setting

When open up the Neo4j Community Edition program, it gives me an option to choose my database location.
I chose the path D:\Program Files (x86)\Neo4j.
When I look at the database information in the browser, I find that this is not where the database is actually located.
It seems to ignore my choice and always put the database in C:\Users\Peter\Documents\Neo4j\default.graphdb. Is there a way I can actually change the database location?
I just tested it and it worked for me.
I chose the new directory directly after install though. But also after choosing a different directory it honored my selection.
Did you have an old installation or a fresh install?

Connecting XAMPP to a domain and adding files

What I need is a web server hosting just for saving large files on it and share it online, so today I downloaded XAMPP Control Panel V3.2.1 as I read on a topic that it can help me.
Actually, I don't have enough knowledge about XAMPP, can I use it to upload files with normal domain(like: www.mydoamin.com/myfile)?, how can I connect the server I build with a domain after purchasing it? and how can I upload files to this domain.
Till now I done all the needed setup, and here's what I get when I start the application:
Also I can use the "MySQL" in the webpage after log-in, and here's how the page looks like:
Is there any recommendation for other application that helps me uploading files to my own domain/server and share it, if this one isn't for these stuff?
XAMPP is software bundle containing cross OS solutions (X) for webserver Apache (A), MySQL database (M), and server-side language PHP (P) and Perl (P).
If you got a domain you need to redirect it to IP on which this XAMPP server works. To do it call/mail your domain registrator (a company that sold you a domain) and ask about it. It involves DNS (Domain Name Server) configuration - ask them how to change DNS to direct it to your XAMPP server.
PS To add files go to htdocs direcotry in your XAMPP instalation or whatever you defined to store files (and websites) and drop your files in there.
As I can see you are not experienced in that kind of things so maybe ask company that sold you a domain name about "shared hosting"? It's preconfigured ready to go server where you send files over FTP

Can I run (XAMPP) MySQl inside my DropBox folder?

Lots of conflicting reports out there when I google; can anyone help?
Basically I want to have the same databases available at work & home PCs, for development porpoises only.
I will only ever be physically at one PC (with a 45 minute trip between) and only then will there be database access. The MySql service will be running on both, but only one will be write/reading the database. Both run Windows 7
I don't need to bother with symlinks, junctions, etc as I have enough space in my DropBox to install all of Xampp there.
Can I do that without corruption?
I use something similar as part of my remote development testing, I have never tried to run a large set of data from this or a production database. Haha, but for testing queries and setting up a couple rows, etc... I use something very similar with little to no problems.
I believe that you can run the portable xampp and mysql from your Dropbox just go to www.portableapps.com to get the xampp and also download the portable launcher from the link on the page.
Let XAMPP server run on your computers, and the data folder saved on your cloud (DropBox, SkyDrive, etc).
You should install XAMPP portable on your root folder (c:) that is the same on all computer you use, then you can move XAMPP data folder (xampp Apache htdocs) and MySQL data (xampp Mysql/data) folder to Dropbox.
Do not use XAMPP installer, but use the portable one.
Configure the folder settings on both Apache and MySQL config file:
C:\xampp\apache\conf\httpd.conf
C:\xampp\apache\conf\extra\httpd-ssl.conf
C:\xampp\apache\conf\extra\httpd-xampp.conf
C:\xampp\mysql\bin\my.ini
Do the same with other server that you use (PostgreSQL, etc).
Make sure that you:
Always turn off XAMPP server after using on each PC.
Always sync Dropbox before changing PC, that is before logging on and after logging off on different computer.
Mind host / local domain variable on each computer.
Its probably better to use same username for all computer you want to use to run the data folder.
Other method is using PortableAppas.com, that is running the apps directly from USB.