Skip to main content

Posts

Postgresql Installation Step By Step

step 1:yum install postgresql-server postgresql-contrib step 2: postgresql-setup initdb step 3:systemctl start postgresql step 4:In Linux by default, a user named postgres is created once PostgreSQL is installed. passwd postgres --->. change the password step 5:Now change to postegresql client psql postgres step 6:createdb testDB ( You can create a new testdb) step 7:createuser samplerole –pwprompt ( create a sample role) step 8:createdb testDB -O samplerole (assign the role to the database) step 9:To connect to new database use psql testdb step 10:to drop a database use dropdb testdb

Mysql Enterprise Backup - Incremental

we are going to test mysql incremental  backup using MEB Mysql Enterprise Backup step1: I am taking full backup of all the existing database to image and compressing them mysqlbackup --user=root --password=Mysql@1234 --backup-dir=/u02/backuptesting/fullbackup --compress  --backup-image=/u02/backuptesting/fullbackup/newbackup.mbi backup-to-image step2:i am now creating a table backuptest in a test database and adding some data in to table  use test; CREATE TABLE backuptest (   id_customer int(10),   monthly_limit int(11),   PRIMARY KEY (`id_customer`) ); insert into test.backuptest (id_customer,monthly_limit) values ('1','2000'); Step 3: Now i am doing a  incremental backup in directory incremental-1 here i am giving incremental-base as  lastbackup history so it will keep base as last fullbackup taken. mysqlbackup  --user=root --password=Mysql@1234 --incremental --incremental-base=history:last_backup --backup-dir=/u02/backup...

Mysql Enterprise Backup - Differential

we are going to test mysql Differential  backup using MEB Mysql Enterprise Backup Step1: I am taking full backup of all the existing database to image and compressing them mysqlbackup --user=root --password=Mysql@1234 --backup-dir=/u02/backuptesting/fullbackup --compress  --backup-image=/u02/backuptesting/fullbackup/newbackup.mbi backup-to-image Step2:i am now creating a table backuptest in a test database and adding some data in to table  use test; CREATE TABLE backuptest (   id_customer int(10),   monthly_limit int(11),   PRIMARY KEY (`id_customer`) ); insert into test.backuptest (id_customer,monthly_limit) values ('1','2000'); Step 3: do Differential Backup here i am giving --incremental-base as dir; which species to the path where fullbackup is taken  , so it means it will take a backup of all changes from the last fullbackup upto now. mysqlbackup  --user=root --password=Mysql@1234 --incremental --incremental-base=dir:/u02/...

Installing Mysql Community server

Installing Mysql community server Step 1: Goto the https://dev.mysql.com/downloads/repo/yum/ and download based on the os version . In my case i am downloading (mysql80-community-release-el6-3.noarch.rpm) Note for the below steps i am using root user else use sudo Step2:Install the repository [root@mysqldb1]# yum localinstall mysql80-community-release-el6-3.noarch.rpm Step3:Install the mysql server [root@mysqldb1]# yum install mysql-community-server Step4:Start the mysqld service [root@mysqldb1]# service mysqld start Step5:Check the mysqld service [root@mysqldb1]# service mysqld status  service mysqld status Redirecting to /bin/systemctl status mysqld.service ? mysqld.service - MySQL Server    Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)    Active: active (running) since Thu 2019-09-26 00:51:53 +04; 13h ago      Docs: man:mysqld(8)            http://d...