Backup & Restore installed package.

to backup packages
1. sudo nautilus
2. copy from /var/cache/apt/archives/* to Desktop/inst_packages

Run in terminal
sudo dpkg –get-selections > ~/Desktop/inst_packages/myPackages

To Recover packages
1. sudo nautilus
2. Paste backup packages to /var/cache/apt/archives/
3. Run in Terminal
sudo dpkg –set-selections < myPackages && sudo apt-get dselect-upgrade

Advertisements

Backup MySQL Database

Here I show a way to full backup of MySQL Database. The command line using mysqldump is bellow.

mysqldump.exe infopath> c:\MySqlBackup.sql –user=Root_OR_Your_user_name –password=Your_Passwd

This command backup your full database on C drive named MySqlBackup.sql
You can also backup your database using graphical user interface.

MySQL remote connection configure

If your MySql server on Linux and you want to use it from another Linux or Windows PC then use the following command.

1. First login on your Linux mysql server (mysql -u root-p)
2. Now enter the following command.

For Set permission on the server:
mysql> grant all privileges on *.* to ‘root’@’%’ identified by ‘root’ with grant option;

For access on the server:
mysql> set password for ‘root’@’%’=old_password(‘passwd’);