Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Automatic MySQL Backup using Batch File on Windows

Backup of your database are important. You can do the backup manually but automatic backup with regular time interval are good and time saving. In this post I am specifically talking about Mysql. Unfortunately there is no free solution for auto Backup. SoThere is a simple workaround available on windows platform to make MySQL backup automatically and freely. For this reason, you require a batch file and you have to write a batch script. And here are the steps for Mysql Database auto Backup:

1. Create a backup.bat file
2. Open the file in notepad and add this

echo off 
start "" "C:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump.exe(your my sql dump address)" --user root --password=(provide your db password here) databaseNameHere --result-file="D:\database backup location SqlFileName.sql" --database databaseNameHere


Now let's break down the string we have mentioned in the above file:

Data Saving Techniques for Unity3d Application

Data is one of the integral element in modern applications of Games, VR/AR or gamification. Unity3d, the most famous and most widely use game-engine provide you different options to save your game data in different ways. Once on a forum, a programmer asks the question that how to save data in unity3d?? and I  answered him with different options. I guess it is necessary to share the detail of the answer for future users. So, here is the list of different options for saving data for unity application. (we will like to update this article to add more techniques if you know anyone).



1. Platform-independent:

One way of saving data in Unity3D in a Platform-independent way is to use the PlayerPrefs class.


Here is the example to set a string and later get it through PlayerPrefs class.


Where the Data Store? Here is the chart:
Platform
Data stored at
Windows
Registry under HKCU\Software\[company name]\[product name] key
macOS
~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, 
Win Phone 8
 application's local folder
WebGL
browser's IndexedDB
Linux
~/.config/unity3d/[CompanyName]/[ProductName]
Android
/data/data/pkg-name/shared_prefs/pkg-name.xml



* company and product names are the names set up in Project Settings

Reference Links:

·         PlayerPrefas Documentation

·   Tutorial PERSISTENCE - SAVING AND LOADING DATA using DontDestroyOnLoad, PlayerPrefs, and data serialization Video Tutorial by unity.

2. Server Side:

You can also use a Server for saving data (like a combination of PHP and MySQL Database). You can use it to save Score Data, user profile, etc., Learn More From Unity Wiki
You can also use third party solution like back4App and firebase.



3. Embedded Database:

SQLite (an embedded database for your app) is another great option for you get the Free Package, it is simple and easy (and my favorite) if you know SQL.

Welcome To R&P (Research and Program)

This site is specifically designed to share different researches, coding snippets, projects, tuts and articles related to computer science and software engineering. Our aim to provide you some great insight about Computer Science & its Researches, AI, Commercial Drone/UAVs, Programming (C#, Javascript, PHP, Python etc), Game Engine (Unity, Unreal etc) and Databases (SQLServer, MySQL, SQLite, Firebase etc).