Skip to Content
It is currently December 12th, 2017, 11:54 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: February 26th, 2014, 9:04 pm 
Offline
SVS Member
SVS Member

Joined: December 28th, 2009, 12:33 pm
Posts: 1340
There are two known problems with SAM's internal backup functionality.
The first one appeared with MySQL 5.6 and is about write permissions for the MySQL server's Windows User.
A detailed explanation and solution can be found below.


###

Another problem appeared with MySQL 5.7.6 (and newer) when a MySQL config setting changed it's default value.
That problem only appears when you install MySQL 5.7.6 or newer from scratch and doesn't affect existing installations where you simply update MySQL.
A detailed explanation and solution can be found in this thread: viewtopic.php?f=20&t=52387


###

--- Original Thread content ---
Resolving SAM backup errors with MySQL 5.6


Multiple people have mentioned that when using MySQL 5.6, SAM backups and restores (using the Tools -> Backup -> Backup or Restore options from within SAM) are not working, and displaying an error message looking something like this:

Image

This issue only happens when using the MySQL 5.6 installer, but not when doing a manual setup using the MySQL 5.6 zip file.

After some nice detective work by Jay and some others, we seem to have gotten to the bottom of the issue.

What seems to have happened is that the MySQL installer was changed, in 5.6, to set up the MySQL service to be run using the Network Service user account.

Previous versions (5.5 and earlier) set up the MySQL service to be run using the Local System user account.

The difference is that the Network Service account has very limited permissions to the local filesystem, especially to the user's application data folders and files, where the SAM application settings and backup folder is located.

The SAM backup system makes use of this MySQL service to create the database backups, so if the MySQL service doesn't have the correct permissions to access the backup folder, which is normally located within the users application data folder, at %localappdata%\SpacialAudio\SAMBC\backup, the backup won't be created correctly, and SAM will show the Backup failed message shown earlier, with the Permission denied message.

Fortunately, the fix for this is very simple.

The following guide should work on any version of Windows, but the actual screenshots were taken from a Windows 7 machine.

The simplest option seems to be to simply change the user that the MySQL service is running as, to now run using the Local System account, which will have the necessary access to the SAM backup folder.

In order to do this, we want to access the Services window. This can be done by clicking the Start button, and typing in services, and then clicking the Services icon that should show up at the top, with the gears icon:

Image

You can also use the Windows key + R to open the Run window, and type in services.msc, or open Task Manager, click on the Serivces tab, and click on the Services... button in the bottom right corner.

Once that Services window is open, you want to locate the MySQL service in that list of services, which should be named MySQL by default.
Once you find that service, double click on it to open the service properties window.
Once it's open, click on the Log On tab on the top, and it should look like this:

Image

As you should be able to see, the service is set to run using the Network Service account by default.

To switch it to use the Local System account, simply click on the "radio button" next to the Local System account option on the top, so that it now looks like this:

Image

Once you do that, click on the Apply button on the bottom of that window, which should show you this message window:

Image

This means that we will have to restart the MySQL service in order for it to start running using the newly selected Local System account user.

Click on the OK button on the message window, and and then on the OK button on the MySQL service properties window.

In order to restart the service, right click on the MySQL service in the Service window, and click on the Restart option.
A Service Control window should pop up, showing you while Windows stops and then starts the service.

Once that's finished, you should now be able to use the SAM backup and restore options without any issue:

Image

An alternate fix would be to give the Network Service user permissions to access your %localappdata%\SpacialAudio\SAMBC\backup folder, but the above method seems to be the easiest and most reliable method.

As always, this is just a basic guide on how to make these changes to your system on your own, but please be cautious when making changes to Windows services, and make sure you understand what you are doing before you make any changes.

_________________
Isaac Levine - Spacial Volunteer Support (SVS)


Top
 Profile  
Reply with quote  
PostPosted: July 11th, 2014, 7:20 am 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
For the record, I was informed by support that MySQL 5.1 is the version that should be used with SAM 2013.6.

Value=US$0.02

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: July 11th, 2014, 8:19 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7380
Location: Aachen (Germany)
That's a horrible idea to use outdated software from 6 years ago if there is compatible and still maintained versions of that software available.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: July 11th, 2014, 1:25 pm 
Offline
SVS Member
SVS Member

Joined: December 28th, 2009, 12:33 pm
Posts: 1340
I'm personally on 5.5 still, but there's no reason to use 5.1, AFAIK.

_________________
Isaac Levine - Spacial Volunteer Support (SVS)


Top
 Profile  
Reply with quote  
PostPosted: July 11th, 2014, 6:36 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7380
Location: Aachen (Germany)
There are regular updates to MySQL 5.5, so I would not consider that an "old" version.
Anything before 5.5 is deprecated and doesn't receive any updates.

I assume that Oracle always supports the latest 2 versions, so when 5.7 reaches the final/stable phase, 5.5 will be deprecated.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: July 12th, 2014, 9:03 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Mastacheata wrote:
That's a horrible idea...

I agree completely. Once I get the new machine stabilized I intend to move to the latest version since the problem that I was addressing turned out to be a Windows 7 date incompatibility issue.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: July 30th, 2014, 9:49 am 
Offline
Senior User
Senior User

Joined: March 20th, 2014, 9:42 pm
Posts: 82
Location: Indianapolis
Followed the guide above, ensuring the local system account was selected, restarted the server, followed by a complete reboot of the system.

Thus on a fresh install of SAM 2014.3 - MySQL CE5.6 -- Workbench 6.1CE on a Windows 2008 R2 Server received the following error when attempting to back up via Tools -->Backup-->Backup:

Quote:
Backup failed! Access denied for user 'xxxxxx' @'%' (using password: YES)

_________________
Image

First LIVE Round-the-Clock Talk Station in the History of Radio.


Top
 Profile  
Reply with quote  
PostPosted: November 23rd, 2014, 9:29 am 
Offline
New User
New User

Joined: March 31st, 2012, 12:31 pm
Posts: 4
I wonder why you were told to use that version when the knowledge base say otherwise _

http://spacial.zendesk.com/entries/3676 ... with-MySQL

Compiled by Mathew and published May 08 it has a link on there to this download-

http://dev.mysql.com/downloads/mysql/5.5.html

As someone struggling to use it, I now wonder, I wish Spacial would give better MySQL instructions for use with Sam Broadcaster, a step by step that would work with web integration of Sam features


Top
 Profile  
Reply with quote  
PostPosted: November 23rd, 2014, 1:42 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7380
Location: Aachen (Germany)
The link to 5.5 is just there because it was the most recent version of MySQL at the time of writing the knowledge base entry.
Any MySQL > 4.1 will do, but you should usually go for the most recent MySQL version published as General Availability release on the MySQL Dev/Open Source website.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: November 24th, 2016, 12:40 pm 
Offline
Junior User
Junior User

Joined: April 26th, 2011, 9:53 pm
Posts: 29
Location: Fort Worth
I am still getting the attached error, suggestions?

Disregard, I figured it out. thanks


Attachments:
secure-file-priv.png
secure-file-priv.png [ 532.25 KiB | Viewed 2576 times ]

_________________
The Best Rock! The Fox!
Top
 Profile  
Reply with quote  
PostPosted: July 3rd, 2017, 7:28 pm 
Offline
New User
New User

Joined: July 3rd, 2017, 7:05 pm
Posts: 1
I've had no joy backing up sam bc (2017.5 debug) with mysql (5.7). I too am getting 'backup failed'

I've changed the mysql service to local and still the same (with and without debug version of sam bc)

I raised this with support but was told it is not possible to backup a mysql db through sam bc

Any suggestions on how to resolve or alternative software to use for backing up?


Top
 Profile  
Reply with quote  
PostPosted: July 4th, 2017, 10:57 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7380
Location: Aachen (Germany)
mysqldump comes with the MySQL Server, but is a commandline tool.
If you're not afraid of that it's really easy to use.

#1 Open a command prompt / shell / cmd.exe and navigate to the folder where you installed MySQL (i.e. C:\Program Files\MySQL Server 5.7\bin) or open the command prompt there directly (open the bin folder in the Windows explorer, right click a white spot in the folder while holding down the shift key and click "open command prompt here")
#2 type this:
mysqldump -uroot -p SAMDB > C:\sambackup.sql

After hitting enter, you'll be asked to enter the password for your root user and the mysqldump tool will create an sql file in the root of your C drive. (You can obviously adjust the path as you like, just pay attention to quote the full path if it contains spaces)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group