2 network pc's with xampp, use one NAS database?

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

2 network pc's with xampp, use one NAS database?

Postby Coastalguy » 19. June 2015 04:41

I currently have 2 PC's, both set up with Xampp installed. I would like both to use the same database to update from either PC. Currently I am doing a copy of the databases (xampp/mysql/data) from the main pc to my 2nd pc each day to keep them updated in sync. What I would like to do is use a single set of the databases on a NAS drive, so both PC's can access and update the same data to eliminate my having to do the copies.

I have moved the databases to a share on my WD NAS drive, and changed the datadir option on the my.ini file to the NAS drive using both the network and mapped drive letter paths. However, with the datadir pointing to the NAS Share, when restarting mysql from the console, it begins to start display the PID, however apparently when assigning the port, it then fails.

Changing the datadir in my.ini back to the xampp folder after moving the databases back, then mysql starts fine. I have tried it with the databases on the NAS drive, in both a public share and private share on the NAS with user security and neither will allow mysql to load.

One of my PC's is running windows 8.1 and the other windows 7 home premium, both networked using HomeGroup, through a NetGear Router. I can share files between both PC's and the NAS drive fine, but I just cannot get xampp to run mysql with the databases on the NAS. Any thoughts?
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: 2 network pc's with xampp, use one NAS database?

Postby Nobbie » 19. June 2015 13:12

How do you start MySQL? As a service or not as a service?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: 2 network pc's with xampp, use one NAS database?

Postby Coastalguy » 19. June 2015 19:24

As a Service
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: 2 network pc's with xampp, use one NAS database?

Postby JJ_Tagy » 19. June 2015 20:20

Depending on your NAS, you may be able to SSH into it and run MySQL from there as they are typically Linux boxes.
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64

Re: 2 network pc's with xampp, use one NAS database?

Postby Nobbie » 19. June 2015 21:42

Coastalguy wrote:As a Service


That is your problem. A Service runs with different UserID than yours, this leads to missing rights for MySQL. Disable MySQL running as service and start it again via Xampp DIalog. Then MySQL is running with your UserID and is enabled to access the same NAS folders as you.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: 2 network pc's with xampp, use one NAS database?

Postby gsmith » 19. June 2015 23:48

Yeah, what Nobbie said about Services.

You can however run services as a specific user. Go into Services in your administrator tools, find mysql, right click and choose properties. On one of the tabs it says "Log on as" with a choice, select "this account," enter username and password, apply, ok, restart mysql.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: 2 network pc's with xampp, use one NAS database?

Postby Coastalguy » 20. June 2015 02:24

On the services, it only asked for a password, but not sure what password, my windows login or the databases? Tried the windows password, and also shut down the mysql services. On both, when trying to restart mysql, received the message it was restarting, but then nothing.... no pid or port. Changed the datadir path back to my xampp data directory and it started fine. Not sure why it works with my hard drive path, but not my NAS drive path.
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: 2 network pc's with xampp, use one NAS database?

Postby gsmith » 20. June 2015 09:46

Your Windows username and password
They must be same on both computers

Win7
http://postimg.org/image/uludfurz5/

Win 8.1
http://postimg.org/image/syccwkes1/
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: 2 network pc's with xampp, use one NAS database?

Postby Nobbie » 20. June 2015 10:13

Coastalguy wrote:On the services, it only asked for a password, but not sure what password, my windows login or the databases? Tried the windows password, and also shut down the mysql services. On both, when trying to restart mysql, received the message it was restarting, but then nothing.... no pid or port. Changed the datadir path back to my xampp data directory and it started fine. Not sure why it works with my hard drive path, but not my NAS drive path.


First of all (before changing anything in Windows), give it a short try:

Stop MySQL (if its running), unmark the Option "Run as Service" (or similar) in the Xampp Control Dialog in front of the MySQL Button (on the left side) and then try to start MySQL again. Does this work? You dont need to modify nor to delete any Windows Service for that, simply unmark and restart.

Finally, if it still does not work, there should be an error log somewhere in MySQL folder (or in the log folder of Xampp), sorry, i do not have a Windows installation here. Try to find the MySQL error log for more information.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: 2 network pc's with xampp, use one NAS database?

Postby Coastalguy » 20. June 2015 22:55

Nobbie,
Yes, I tried both just disabling the service by unchecking the Mysql entry on the xampp control panel and also by changing the service. Neither worked with the network path, but both work with the hard drive path. Found the error log file, below are the entries for yesterday when I did this.....

150619 14:17:52 [Note] Plugin 'FEDERATED' is disabled.
150619 14:17:52 InnoDB: The InnoDB memory heap is disabled
150619 14:17:52 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150619 14:17:52 InnoDB: Compressed tables use zlib 1.2.3
150619 14:17:52 InnoDB: Initializing buffer pool, size = 16.0M
150619 14:17:52 InnoDB: Completed initialization of buffer pool
150619 14:17:52 InnoDB: highest supported file format is Barracuda.
150619 14:17:54 InnoDB: Waiting for the background threads to start
150619 14:17:55 InnoDB: 1.1.8 started; log sequence number 2516113
150619 14:17:55 [Note] Event Scheduler: Loaded 0 events
150619 14:17:55 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL)
150619 21:09:23 [Note] c:\xampp\mysql\bin\mysqld.exe: Normal shutdown

150619 21:09:23 [Note] Event Scheduler: Purging the queue. 0 events
150619 21:09:23 InnoDB: Starting shutdown...
150619 21:09:23 InnoDB: Shutdown completed; log sequence number 2516123
150619 21:09:23 [Note] c:\xampp\mysql\bin\mysqld.exe: Shutdown complete

150619 21:18:23 [Note] Plugin 'FEDERATED' is disabled.
150619 21:18:23 InnoDB: The InnoDB memory heap is disabled
150619 21:18:23 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150619 21:18:23 InnoDB: Compressed tables use zlib 1.2.3
150619 21:18:23 InnoDB: Initializing buffer pool, size = 16.0M
150619 21:18:23 InnoDB: Completed initialization of buffer pool
150619 21:18:23 InnoDB: highest supported file format is Barracuda.
150619 21:18:24 InnoDB: Waiting for the background threads to start
150619 21:18:25 InnoDB: 1.1.8 started; log sequence number 2516123
150619 21:18:25 [Note] Event Scheduler: Loaded 0 events
150619 21:18:25 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL)
150619 21:55:23 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

150619 21:55:23 [Note] Event Scheduler: Purging the queue. 0 events
150619 21:55:23 InnoDB: Starting shutdown...
150619 21:55:24 InnoDB: Shutdown completed; log sequence number 2516133
150619 21:55:24 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete

150619 21:56:04 [Note] Plugin 'FEDERATED' is disabled.
150619 21:56:04 InnoDB: The InnoDB memory heap is disabled
150619 21:56:04 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150619 21:56:04 InnoDB: Compressed tables use zlib 1.2.3
150619 21:56:04 InnoDB: Initializing buffer pool, size = 16.0M
150619 21:56:04 InnoDB: Completed initialization of buffer pool
150619 21:56:04 InnoDB: highest supported file format is Barracuda.
150619 21:56:05 InnoDB: Waiting for the background threads to start
150619 21:56:06 InnoDB: 1.1.8 started; log sequence number 2516133
150619 21:56:06 [Note] Event Scheduler: Loaded 0 events
150619 21:56:06 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL)
150619 22:08:00 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

150619 22:08:00 [Note] Event Scheduler: Purging the queue. 0 events
150619 22:08:00 InnoDB: Starting shutdown...
150619 22:08:03 InnoDB: Shutdown completed; log sequence number 2516422
150619 22:08:03 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: 2 network pc's with xampp, use one NAS database?

Postby Nobbie » 21. June 2015 10:56

I cannot find any usefull hint there. Sorry, I am out of ideas.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: 2 network pc's with xampp, use one NAS database?

Postby Coastalguy » 23. June 2015 17:07

Ok, got it to work using a mapped drive letter for the network path. Didn't work mapping to the top folder adding the lower folder to the drive letter path, but mapping a drive letter to include the top and lower folder containing the databases worked. As you mentioned, I did have to uninstall the windows service on mysql for it to work though. Now because of that, mysql no longer starts up on windows boot. Tried checking mysql on the xampp control panel config startup option, but that only starts it when the xampp control panel is started. How do I now start mysql on windows boot, where it is not a service?

Tried putting mysql_start.bat into the windows 8.1 shell:start folder, but it only opens a cmd window advising that it is being started on the control panel, but then it just locks there, not starting mysql. I guess I could put the xampp control panel in the shell:start folder, with the config checked to start mysql when it is opened, but I assume that would then leave the control panel open, which I am trying to avoid. Would just like everything to start in the background. Thanks,
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: 2 network pc's with xampp, use one NAS database?

Postby mark.mcdonald » 23. June 2015 17:17

Use a scheduled task to call the mysql_start.bat otherwise you have to run it as a service if trying to avoid running a control panel which takes up nothing in regards to cpu usage (silly to worry about)
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 81 guests