MySQL Replication ERROR 1062: Duplicate Entry for Primary Key when starting Slave

In this blog,we will see how to resolve the MySQL Replication ERROR 1062 : Duplicate Entry for Primary Key when starting Slave. Here we will skip the MySQL slave error. This error,will be raising after successfully establishing MySQL Master and Slave Connection and got error like “MySQL slave duplicate entry with MySQL error code 1062” When we take dump from Master database,there will be possibility that our Master Database has duplicate entries,but it wont work in the slave.Hence we have to make one change in Configuration file of MySQL “my.cnf”…

Read More

Search and delete files older than “N” days

Lets see how we can  search specific  files or directory which was created “N” days before and delete. For example find files older than 60 days,   Replace the ls with -delete to remove files. Be careful, as you might end up deleting important files.  Always keep backups. Always run -ls option first to check about files. You have been warned. How to ask for confirm before deleting Explanation find : Find command /path/to/dir/ : Directory path to search -type f : Only works on files. (the -type d option…

Read More

Hide Nginx version

By default, the Nginx version will be displayed when we query HTTP headers or error generated by the Nginx server. lets see how we can hide or remove the Nginx version. First lets see how Nginx version is displaying using cli Through curl command,we can see the version on error pages and in the “Server” response header field. Sample Output Now lets hide Nginx Version using server_tokens directive We need to set server_tokens to off to hide the Nginx server version.Now we will edit nginx.conf file.We will set server_tokens in…

Read More

Setup RabbitMQ Cluster on Ubuntu 18.04

RabbitMQ

RabbitMQ is one of the most widely deployed open source message brokers. It is an implementation of the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol, Message Queueing Telemetry transport and other protocols via a plugin.RabbitMQ is written in the Erlang programming language, it offers support for client interfaces and libraries for all major programming languages including Python, NodeJS, Java, PHP etc. Now let’s see how to set up a RabbitMQ Cluster on Ubuntu Server.   Prerequisites We need three Ubuntu 18.04 servers, let the IP and…

Read More

Find files larger than particular Size in Linux

ind files that are bigger than

We may face disk space issues in our production/development/QA systems were multiple applications will be running. So if we need to search for files greater than the particular size. How would we do that? To check manually each and every file size is particularly difficult. Now we will see how to find files bigger or smaller than X size in Linux systems. Find Files Bigger Or Smaller Than X size We can use “find” command to find the files bigger or smaller than the given size. For now, if we…

Read More

Install Sublime Text on Ubuntu

sublime text editor

Sublime is a popular and widely used text editor that supports multiple programming languages. It is a popular text editor between the developers. It includes wide features such as Syntax Highlight, Auto Indentation, File Type Recognition, Sidebar, Macros, Plug-in and Packages that make it easy for working with the codebase. We can install Sublime through two ways in Ubuntu. Through snapd Through PPA Install Sublime through snapd We can install Sublime-text latest version through below command. After some time it will be installed and sublime will be ready to use.…

Read More

Install Postman on Ubuntu 16.04/18.04/19.10/20.04

Postman install ubuntu

Postman is an application which is currently one of the most popular tools used in API development and testing. It helps you manage your APSs in every stage of development from designing and testing to publishing API documentation and monitoring. It is a very user-friendly interface for calling remote API. Prerequisites Make sure you having Sudo privileges while installing this application. If you are running on Ubuntu 16+ or late, including Ubuntu 18+, Ubuntu 19+ and Ubuntu 20+, you don’t need to do anything. Snap is already installed and ready…

Read More

How to download files from  Cloud Object Storage Service (OSS) to Local system

Aliaba Cloud OSS

Hi All In our last article, we have seen how to Create Object Storage Service (OSS) bucket and Create a RAM user in Alibaba Cloud. & How to Copy files to Alibaba Cloud Object Storage Service  Now we will see how to download files from  Cloud Object Storage Service (OSS) to Local system. Requirements OSS should be already activated and RAM user should be created and Access Key and Secret Key should be required. If you not yet created, Kindly go through our previous article how to Create Object Storage…

Read More

Install RabbitMQ Server on Ubuntu 18.04

RabbitMQ

RabbitMQ is one of the most widely deployed open source message brokers. It is an implementation of the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol, Message Queueing Telemetry transport and other protocols via a plugin. Install ErlangRabbitMQ needs Erlang before we start installing Rabbit MQ package,so let’s install Erlang first. Install Rabbit MQ Server After installing, let’s check the service is running or not and enable to start on boot. Let’s enable service to start on boot.   Enable Management Dashboard for RabbitMQFor easy management, let’s…

Read More

Change the MariaDB Default Data Directory

We need to change the default data directory /var/lib/mysql to a different location. Now we will see how to change the default MySQL / MariaDB data directory to a different path on a CentOS/RHEL 7 server. The new directory in /data/techrunnr/mysql-data and this directory should have ownership of mysql:mysql   1. Find the current default data directory using the following command. Now we can see default directory is /var/lib/mysql/ 2. Copy MySQL data to a new location First, we need to stop the MariaDB service Now Database is stopped, now…

Read More