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

Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline

Hi All, this document deals with how to fix ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. These messages indicate that the table’s definition allows rows that the table’s InnoDB row format can’t actually store. The Below configuration fixed my issue.   Restart MySQL or MariaDB restart or   © 2020, Techrunnr. All rights reserved.

Read More

how backup and restore mysql database using ansible

Hi All, This document shows you how backup and restore MySQL database using ansible. Ansible is a Provisioning and configuration management tool which can be used for both Linux and windows platform. Ansible has reached the best place under the best DevOps tools because it is very is easy and simple. Ansible playbook is written in YAML file which is human readable and understandable which makes ansible popular. Step 1: Create a YAML file vi backup-restore.yml Paste the below contents, explanations are given below. First task perform DB backup to…

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

how to install MariaDB 10.4 in Centos 7

Hi All, this document shows you how to install MariaDB 10.4 in Centos 7. MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system, intended to remain free and open-source software under the GNU General Public License. Let’s go to the installation Part. Step 0: Update the system This will help you to keep update the system to the latest version. Once you update the system reboot the server as some packages need a reboot to updates to take effect. Step 1: Add the MariaDB 10.4…

Read More

how to remove all data from specific MongoDB collections

HI all, this document shows you how to remove all data from specific MongoDB collections. MongoDB is NoSQL database, MongoDB uses JSON-like documents with optional schemas. Sometimes there will be a requirement to delete all the data of specific MongoDB collection. Here we will provide the steps for that. Step 1: log in to mongo shell Step 2: Now choose your database, Step 3: now display your collections under scrapper database, Step 4: Now delete all the data from user collection.   Success, now you deleted all the data from…

Read More

how to get database structure

Hi All, this document deals with how to get database structure. MySQL is an open-source relational database management system. Its name is a combination of “My”, the name of co-founder Michael Widenius’s daughter, and “SQL”, the abbreviation for Structured Query Language How to perform   The above command creates a .sql file with database and table structure without data. -d means no data or else you can use the below command,   © 2020, Techrunnr. All rights reserved.

Read More

Failed to set up listener: SocketException: Permission denied

Hi All, this document deals with how to fix Failed to set up listener: SocketException: Permission denied error. This issue is related to permission issues where MongoDB is not able to start the service. Check the permission of tmp location Change the permission and ownership of temp folder. chown root:root /tmp chmod 1777 /tmp Now start the MongoDB service. service mongod start © 2019, Techrunnr. All rights reserved.

Read More

how to reset the AWS RDS instance password

Hi All, this document shows how to reset the AWS RDS instance password. Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need. Configuration Step 1: log in to the AWS management console. Step 2: Select…

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