Skip to main content

Posts

Showing posts from March, 2019

How to setup a slave for replication in 6 simple steps with Percona XtraBackup #mysql #centos

How to setup a slave for replication in 6 simple steps with Percona XtraBackup Data is, by far, the most valuable part of a system. Having a backup done systematically and available for a rapid recovery in case of failure is admittedly essential to a system. However, it is not common practice because of its costs, infrastructure needed or even the boredom associated to the task.  Percona XtraBackup  is designed to solve this problem. You can have almost real-time backups in 6 simple steps by setting up a replication environment with  Percona XtraBackup . Percona XtraBackup  is a tool for backing up your data extremely easy and without interruption. It performs “hot backups” on unmodified versions of  MySQL  servers (5.1, 5.5 and 5.6), as well as  MariaDB  and  Percona Servers . It is a totally free and open source software distributed only under the  GPLv2  license. All the things you will need Setting up a slave for replication with  Percona XtraBackup  is really a

TCP SOCKETS CHAT APPLICATION(SERVER & CLIENT) USING C

SERVER #include<stdio.h> #include<netinet/in.h> #include<sys/types.h> #include<sys/socket.h> #include<netdb.h> #include<stdlib.h> #include<string.h> #define MAX 80 #define PORT 43454 #define SA struct sockaddr void func(int sockfd) { char buff[MAX]; int n; for(;;) { bzero(buff,MAX); read(sockfd,buff,sizeof(buff)); printf("From client: %s\t To client : ",buff); bzero(buff,MAX); n=0; while((buff[n++]=getchar())!='\n'); write(sockfd,buff,sizeof(buff)); if(strncmp("exit",buff,4)==0) { printf("Server Exit...\n"); break; } } } int main() { int sockfd,connfd,len; struct sockaddr_in servaddr,cli; sockfd=socket(AF_INET,SOCK_STREAM,0); if(sockfd==-1) { printf("socket creation failed...\n"); exit(0); } else printf("Socket successfully created..\n"); bzero(&servaddr,sizeof(servaddr)); servaddr.sin_family=AF_