[Mac OS X] MySQL and sharing USB drives over the network

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #1
Using a current model Mac Mini running OSX Mavericks and Gotham 13.1 as a headless XBMC server, with UPNP sharing to 2x Apple TVs, 1x Macbook and 1x iPad. I now wish to use MySQL sharing instead for the extra features it allows. All my media is on external USB drives plugged into the Mac Mini and can be accessed over the network from other OSX devices. The MySQL instructions seem to suggest the drives should be shared over the network and to use the same network path on all instances of XBMC, presumably including the headless server. But that doesn't let me see the drives on the network, only on its own USB ports (Finder reports: 'This file server is available locally on your computer. Access the volumes and files locally'.)

Has anyone encountered the same problem?

TIA - GeoffT.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,171
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #2
Can you add the video source by just typing in

smb://IP.ADDRESS.GOES.HERE

Using the IP address for the server/Mac Mini?

For example,

smb://10.0.0.13

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #3
Sadly not. In finder on the Mac Mini I get the 'Access the volumes and files locally' message and XBMC simply does not see the drive when pointed at the network path. Sad
find quote
setlursh Offline
Junior Member
Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #4
I have successfully implemented the setup you've described (MySQL sharing from an OS X server). Instead of mounting the drives through OS X, add them as samba shares from within xbmc. This will allow you to access files "remotely" on the local machine.

In case it matters I'm running mavericks server and gotham, and I haven't encountered any issues so far.
(This post was last modified: 2014-06-23 18:29 by setlursh.)
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Sad  RE: [Mac OS X] MySQL and sharing USB drives over the network
Post: #5
Sounds promising, but sadly still does not work for me. My setup has the media stored on USB drives plugged into the Mac Mini running the main instance of XBMC, which also runs the MySQL server. The drives mount themselves as they are directly attached and detected by OSX. XBMC sees them as mounted volumes only.

If I go to the main instance of XBMC running on the same Mac Mini and try adding as a Source smb://192.168.0.54/Drive1/TV Shows (which is the path from anywhere else on the network) I get two error messages: First "Operation not permitted" followed by "Could not retrieve directory information. This could be due to the network not being connected. Would you like to add it anyway".

If I answer 'Yes" and add it anyway it appears in the list of Sources. But selecting it in XBMC thereafter produces two more errors: "Operation not permitted" followed by "Could not connect to network server".

A bit of a Catch22 I think. :(
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #6
To rephrase the problem slightly - how can i access a directly attached, mounted volume from the same OSX computer using a network share instead of the local path?

It is at root an OSX problem, not an XBMC problem, but it still breaks MySQL library sharing for any drives which are directly connected to the designated server.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,171
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #7
I just tried this myself on OS X 10.8.5 with the normal SMB sharing in OS X, and it worked just fine. I enabled SMB file sharing, and on that same computer I opened XBMC and typed in "SMB://10.0.0.16" (the IP of that machine), and it loaded the files and played them just fine. No issue with OS X that I can see.

Do you have some kind of weird firewall settings, perhaps?

EDIT: I see you are having the issue with 10.9. Let me update my hackintosh and see if it happens there.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
(This post was last modified: 2014-06-29 13:55 by Ned Scott.)
find quote
setlursh Offline
Junior Member
Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #8
Try creating a sharing only user in system preferences, then accessing the samba shares using the username and password for this new account in xbmc. This way you avoid accessing a remote share as a user who is already logged in, something mavericks doesn't like.

For clarity's sake, if your logged in user running xbmc is "johndoe", you should access the shares using the credentials of a different, sharing only user, ie. "janedoe". I also explicitly set the credentials when adding sources as follows: "smb://username:password@192.168.0.1/Volumes/drive1"

Hope this helps.
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #9
I did as suggested and created a Sharing Only user (Username xbmc, Password xbmc) on the MySQL/XBMC host platform, then explicitly shared both the USB drive itself (Drobo 2) and the folder containing TV Shows (Archived TV Files):

[Image: Sharing1_zps5db3615c.jpg]

[Image: Sharing2_zps6f3d7a72.jpg]

Trying to connect to the share in finder on the local machine:

[Image: Shares_zpsef513b21.jpg]

Produces this result:

[Image: Error1_zpsb286ed0c.jpg]

With the share added to sources.xml (192.168.0.3 is a NAS drive, 192.168.0.54 is the host) on the local machine thus:

[Image: Sources_zpsf9943ef3.jpg]

Browsing to Videos/Files from XBMC Produces this error in XBMC:

[Image: XBMC1_zps917fad25.jpg]

I am able to browse the share freely from any other device on the network.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,171
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #10
Don't mount the drive in OSX. Type the SMB path in XBMC itself when you add a source (add videos).

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #11
Appreciate everyone's help and patience in trying to resolve this issue. So here's where I am now-

I plugged in another HFS formatted USB Drive (actually a memory stick) for testing purposes. It mounted right away of course. With the help of this advice (http://www.cnet.com/uk/how-to/prevent-a-...g-in-os-x/) I arranged so it wouldn't mount. Prior to rebooting, while it was still mounted, I shared it for the XBMC sharing only account and could access it remotely at smb://xbmc:xbmc@192.168.0.54/USB Stick (note the /Volume was not required).

On rebooting the drive no longer mounted as was not visible in Finder, though DiskUtility showed it as greyed out.

So now I try accessing the drive at smb://xbmc:xbmc@192.168.0.54/USB Stick (and for completeness ...54/Volumes/USB Stick) from a networked Mac and get "There was a problem connecting to the server 192.168.0.54. The share does not exist on the server."

Trying the same from the local machine gets the "This file server is available on your computer. Access the volumes and files locally." error.

Trying to add it as a source in XBMC gets the broken pipe error once again.

Just wondering if maybe I need the OSX Server extensions to make this work?
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,171
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #12
1) plug drive into OS X normally. That part is fine. It can be mounted, but you obviously can't mount it twice, which is what OS X is telling you.

2) When you type in "smb://" you should be in ---> XBMC <---, not the OS X Finder. XBMC has it's own SMB client. As in, in XBMC click on "add videos" and don't hit "browse", but instead type in "smb://etc...." into the text field inside of XBMC.

At no point should you ever see the "Connect to server" window that you posted above.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #13
I persevered with SMB some more with no luck then read many horror stories about Mavericks 10.9.2 onwards having broken Samba entirely with a whole new implementation. So I downgraded to 10.9.1 but still couldn't get it to work. Then I finally hit on this blog entry - via a different SMB fix - which has finally allowed me to use a network path on the server, as well as the client installations, of XBMC.

But I now seem to have a problem with the MySQL database as the server XBMC - despite having the necessary settings in Advancedsettings.xml - has defaulted to using its own database again. Maybe a result of the downgrade of OSX, but it was an in-place OS installation and everything else is intact.

One reinstall of MySQL coming up...
(This post was last modified: 2014-07-11 23:42 by gtwibell.)
find quote
gtwibell Offline
Junior Member
Posts: 33
Joined: Jun 2004
Reputation: 0
Post: #14
Well, definitely got somewhere with NFS sharing. I can now use nfs://xbmc:xbmc@192.168.0.54/Volumes/Untitled/TV Shows/ on all my devices and on the XBMC server as a valid media path in XBMC. However I now seem unable to make MySQL work any more. I followed the exact same steps as when I was using SMB and media held on a NAS (when it synced across all devices 100%) substituting the nfs: paths where necessary, but I just don't see the library anywhere else except on the XBMC/MySQL server itself.

Must have installed, uninstalled and reinstalled MySQL ten times now all to avail. And nothing in the xbmc.log files on the remote devices to indicate what might be wrong.
find quote