It is currently August 23rd, 2019, 6:02 am

 All times are UTC - 6 hours [ DST ]

 Page 2 of 2 [ 20 posts ] Go to page Previous  1, 2
Author Message
 Post subject: Re: Fixing backup errors with MySQL 5.7.6 and newerPosted: June 27th, 2018, 6:57 am
 New User

Joined: November 30th, 2013, 5:17 am
Posts: 4
Mastacheata wrote:
I would suggest leaving the SAM Backups alone and using mysqldump instead.
Here's how I automated that on my machines: (You might need to adjust the paths if you used different MySQL versions or installed to a different location)
viewtopic.php?p=206176#p206176

As of SAM Broadcaster 2017.8 it has a built-in mechanism to execute external commands, so you could get the backup done using mysqldump without using Windows Task Scheduler at all.

Dear Mastacheata,

Sir, I wish to thank you 1,000 times for your time & advice..Alas, that will take too long but seriously.
Thank you from the bottom of my heart!! <3 <3 <3
I have been dealing with trying to solve this for now 5 days. (As you can see from date and time of my post.) I did attempt to follow this plan of attack but am very limited in Mysql language syntax. I will not go into details of my travels during the past 5 days but will tell you that it has been Extremely Ugly! & again
I am fairly sure that I will be able to recreate this in my machine and will definitely be back to inform you of my success.
Sincerely,

Shannon Marissa

Top

 Post subject: Re: Fixing backup errors with MySQL 5.7.6 and newerPosted: June 27th, 2018, 4:39 pm
 SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7869
Location: Aachen (Germany)
Shannons69 wrote:
Alas, that will take too long but seriously.

Huh? Take too long?
Now I'm really curious about your idea of long and short timespans.

As you must obviously already know the username and password to your MySQL Server, those two blanks are the easiest to fill in.
Then you need to find out the path to where you installed the MySQL Server.
That should be pretty easy to find: It's eiter C:\Program Files\MySQL\MySQL Server x.x or C:\Program Files (x86)\MySQL\MySQL Server x.x or you changed the path to something custom, in which case you should definitely know where it is.

That's all that needs to be filled out.
Shouldn't take more than 2 minutes to figure those 3 out.

Now you need to create a batch file:
Create a new text file in Notepad and make sure to select the All (*.*) type in the dropdown when saving, so the filename is really something.bat and not something.bat.txt

Last step:
Run a command as admin. Search for CMD, right-click the dosbox icon, select run as administrator, type in the path to your just created bat file and hit enter.

Everything done thereafter.
Shouldn't take more than 10 minutes at most.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

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

My Project:

Top

 Post subject: Re: Fixing backup errors with MySQL 5.7.6 and newerPosted: June 29th, 2018, 11:56 pm
 New User

Joined: November 30th, 2013, 5:17 am
Posts: 4
To Moderators - I now know why you received "3" of the same posts from me, It is NOT my fault.
Using the Chrome browser - created post using 'quick reply' - Hit submit once I was done. Nothing happened. I hit submit once again and it took the same post into the editor. My post was still not visible so I changed font color (Why not, it was there.) and submitted the 3rd time.

This time however I was able to see two (2) and was able to edit this one. Hence my attempt to notify you of what happened. I did not see a 'delete' option. Once this has been read - please delete it for me and please look into why this occurred. I take great pride in being not only courteous but also accurate in anything I post to a forum. (ANY forum)

Shannon Marissa

Last edited by Shannons69 on June 30th, 2018, 12:10 am, edited 1 time in total.

Top

 Post subject: Re: Fixing backup errors with MySQL 5.7.6 and newerPosted: June 29th, 2018, 11:59 pm
 New User

Joined: November 30th, 2013, 5:17 am
Posts: 4
Good morning Mastacheata,

Sadly, you missed my attempt at humor.. :$It would take me too long to thank you 1,000 times.. Anyways, your help does allow me to create a backup and I even was able to get as far as to not have to type a password each and every time but alas, there is no way to automate it. It has to be done with Admin privileges to execute the Mysqldump - In Windows 10, the only way to do this is with PowerShell. To be able to get it to be automated, the script needs to be written inside of PowerShell. Which means that adding the date to the backup file name is not possible nor is it possible to use it with Scheduler. My newly created batch file is NULL. :'( I still wish to thank you for your time once again and it is not for waste I am sure as someone - sometime will have the same problem. (One of the reasons that I came back as well.) Hopefully, we both will be able to save some of the frustration that I have felt. The script must be created in PowerShell using "cmdlets" of which I am off to learn about... Right now. So once again...Not 1,000 times (A) but just once.. Thanks! Shannon Marissa _________________ Shannon Marissa Top  Post subject: Re: Fixing backup errors with MySQL 5.7.6 and newerPosted: June 30th, 2018, 10:24 am  SVS Member Joined: December 6th, 2004, 9:00 am Posts: 7869 Location: Aachen (Germany) Shannons69 wrote: Sadly, you missed my attempt at humor.. :$ It would take me too long to thank you 1,000 times.

Hahaha, oh sorry, I completely misunderstood that. And as much as I'd like to blame it on poor understanding of the english language (which still happens from time to time, especially when people want to be sarcastic or have slight undertones), I must admit that it was just me reading only half of the words in your post.

Quote:
It has to be done with Admin privileges to execute the Mysqldump

You can just add another checkbox in the task scheduler to run a task with admin privileges. Just add the "/RL HIGHEST" option to the command for creating the task:
Code:
schtasks /Create /SC WEEKLY /TN MySQLBackup /ST 22:00 /TR "c:\path\to\the\above\file.bat" /RL HIGHEST

You might want to delete the old task first. Either by looking it up in the task scheduler by hand or by running
Code:
schtasks /DELETE /TN MySQLBackup

As for PowerShell CmdLets: Once you enabled running PowerShell scripts at all, there's nothing keeping you from just typing the same stuff found in a batch file. You only get addon functionality and barely loose anything that was there in CMD batch files.
Self-elevating PowerShell scripts will only work in interactive context as they require confirmation from the user. You can't use that for running a powershell script in user mode from the task scheduler and then have it magically get admin privileges. That would completely undermine the privelege separation of Windows.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

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

My Project:

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 2 of 2 [ 20 posts ] Go to page Previous  1, 2

 All times are UTC - 6 hours [ DST ]

#### Who is online

Users browsing this forum: Baidu [Spider] and 22 guests

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

Search for:
 Jump to:  Select a forum ------------------ Software    SAM Broadcaster       Web Features       PAL       Feature Requests    SAM DJ    SAM Cast    Other Software Community    General Discussion    Spacialnet Discussion       PlayerSDK    Audiorealm Directory    Free Content/Self Promotion