Posts

Showing posts from June, 2019

Quickly configure replication using DBdeployer [SandBox]

Image
Quickly configure replication using DBdeployer [SandBox] We might have different scenarios when we need a quick setup of replication either between the same version of MySQL (Like 8.0 --> 8.0) or between the different version of MySQL (Like 5.7 --> 8.0) to perform some testings.  Here in this blog post, I will explain how we can create our replication lab setup quickly using the virtual machine and DBdeployer tool.  Let's see, how to create replication between the same version and different version of MySQL using DBdeployer step by step.  Create CentOS VM Please find my this blog post link where you will get instruction about, how you can create CentOS virtual machine using the vagrant.   Install DBdeployer tool -- Run below command to install the latest DBdeployer package. [root@centos7-test-vm ~]# yum -y install wget [root@centos7-test-vm ~]# VERSION=1.33.0 [root@centos7-test-vm ~]# OS=linux [root@centos7-test-vm ~]# origin=https://gi

MySQL 8.0 : Error Logging

Image
MySQL 8.0 : Error Logging Here I would like to explain, How MySQL 8.0 server can be configured to log diagnosis messages inside the error log file.  Generally, the error log contains: A record for mysqld service startup and shutdown. Diagnostic messages such as errors, warnings, and notes during mysqld server startup, running or shut down.  A stack trace if mysqld exits abnormally.  mysqld_safe writes once it finds mysqld exists abnormally and mysqld_safe invoke/start mysqld .  Error Log Component Configuration MySQL 8.0 uses the MySQL error log component architecture that performs log event filtering and writing . These error log components can be configured using the system variable to achieve the desired logging results inside the error log file. We have mainly two types of error log components: filter & sink . Error Log Filter Components --->  Filter components, mainly process log events, to add, delete or modify event fields or to delete

How to properly shutdown MySQL before any maintenance activity

Image
How to properly shutdown MySQL before any maintenance activity We might have different scenarios once we need to stop MySQL service before performing either server or database activity like patching/upgrade.   Before performing such activity, we need to make sure that we stop MySQL service properly to avoid any unforeseen crashes once our maintenance activity complete and MySQL service is started.  Here I would like to share the below steps which should be performed and take care to properly stop MySQL service.  Step 1: Ensure we don't have any long-running queries. Manually verify by checking the processlist. show processlist;  Step 2: If it is the master node, then ensure to stop application write hits on the database by doing either stop an app and put in maintenance OR if we have any failover solution then move write hits on another node.  Step 3: If it is a slave node, then STOP replication and note down the stopped replication co