Skip to main content

Posts

How To Create a New User and Grant Permissions in MySQL #mysql #centos #user #permission

Introduction MySQL is an open-source database management software that helps users store, organize, and later retrieve data. It has a variety of options to grant specific users nuanced permissions within the tables and databases—this tutorial will give a short overview of a few of the many options. What the  Highlights  Mean Throughout this tutorial, any lines that the user needs to enter or customize will be  highlighted ! The rest should mostly be copy-and-pastable. How to Create a New User In  Part 1 of the MySQL Tutorial , we did all of the editing in MySQL as the root user, with full access to all of the databases. However, in cases where more restrictions may be required, there are ways to create users with custom permissions. Let’s start by making a new user within the MySQL shell: CREATE USER ' newuser '@'localhost' IDENTIFIED BY ' password '; Note:  When adding users within the MySQL shell in this tutorial, we will specify the user’...

RHEL 7 / centos 7 root Password Reset

RHEL 7 / centos 7 root Password Reset. Step 1:  Break the Consloe while Linux boot. Step 2: Press "e" to edit the kernel. Step 3: append the entry at the end of linux line as below rd.break console=tty1 Step 4:  Press CTRL+X Step 5:  mount -o remount,rw /sysroot chroot /sysroot Step 6: change root password Step 7:  touch ./autorelabel  Step 8:  Type exit and then again exit

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...

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_...