Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Warning: Cannot modify header information - headers already sent by (output started at /home1/minerho3/public_html/wp-includes/functions.php:6078) in /home1/minerho3/public_html/wp-includes/feed-rss2.php on line 8
MySQL Consulting https://minervadb.com/index.php/tag/mysql-dba/ Committed to Building Optimal, Scalable, Highly Available, Fault-Tolerant, Reliable and Secured WebScale Database Infrastructure Operations Tue, 06 Oct 2020 09:32:34 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://minervadb.com/wp-content/uploads/2017/10/cropped-LogoColorTextRight-32x32.jpeg MySQL Consulting https://minervadb.com/index.php/tag/mysql-dba/ 32 32 Benchmarking MySQL 8.0 Performance on Amazon EC2 https://minervadb.com/index.php/2020/10/05/benchmarking-mysql-8-0-performance-on-amazon-ec2/ Mon, 05 Oct 2020 18:24:14 +0000 http://minervadb.com/?p=4487 MySQL 8.0 Performance Benchmarking on Amazon EC2 The scope of performance benchmarking The core objective of this benchmarking exercise is to measure MySQL 8.0 performance, This include INSERTs , SELECTs and complex transaction processing (both [...]

The post Benchmarking MySQL 8.0 Performance on Amazon EC2 appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL 8.0 Performance Benchmarking on Amazon EC2

The scope of performance benchmarking

The core objective of this benchmarking exercise is to measure MySQL 8.0 performance, This include INSERTs , SELECTs and complex transaction processing (both INSERTs and SELECTs) without any tuning of MySQL 8 instance’s my.cnf. We agree tuning my.cnf will greatly improve performance but in this activity we wanted to benchmark MySQL 8 transaction processing capabilities and technically in MinervaDB we measure performance by Response Time and believe you can build high performance MySQL applications by writing optimal SQL. We have used Sysbench (https://github.com/MinervaDB/MinervaDB-Sysbench release 1.0.20) for this benchmarking activity. This is not a paid / sponsored benchmarking effort by any of the software or hardware vendors, We will remain forever an vendor neutral and independent web-scale database infrastructure operations company with core expertise in performance, scalability, high availability and database reliability engineering. You can download detailed copy of this benchmarking here

Note: This MySQL 8.0 performance benchmarking paper is published by MinervaDB Performance Engineering Team, You are free to copy the entire content for research and publishing without copyrighting the content. This document  is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

☛ A low cost and instant gratification health check-up for your MySQL infrastructure operations from MinervaDB

  • Highly responsive and proactive MySQL performance health check-up, diagnostics and forensics.
  • Detailed report on your MySQL configuration, expensive SQL, index operations, performance, scalability and reliability.
  • Recommendations for building an optimal, scalable, highly available and reliable MySQL infrastructure operations.
  • Per MySQL instance performance audit, detailed report and recommendations.
  • Security Audit – Detailed Database Security Audit Report  which includes the results of the audit and an actionable Compliance and Security Plan for fixing vulnerabilities and ensuring the ongoing security of your data.

** You are paying us only for the MySQL instance we have worked for :

MySQL Health Check-upRate
( plus GST / Goods and Services Tax where relevant )
MySQL infrastructure operations detailed health check-up, diagnostics report and recommendationsUS $7,500 / MySQL instance

☛ MinervaDB contacts – Sales & General Inquiries

Business FunctionContact
☎ CONTACT GLOBAL SALES (24*7)📞 (844) 588-7287 (USA)
📞 (415) 212-6625 (USA)
📞 (778) 770-5251 (Canada)
☎ TOLL FREE PHONE (24*7)📞 (844) 588-7287
🚩 MINERVADB FAX+1 (209) 314-2364
📨 MinervaDB Email - General / Sales / Consultingcontact@minervadb.com
📨 MinervaDB Email - Support support@minervadb.com
📨 MinervaDB Email -Remote DBAremotedba@minervadb.com
📨 Shiv Iyer Email - Founder and Principal shiv@minervadb.com
🏠 CORPORATE ADDRESS: CALIFORNIAMinervaDB Inc.,
340 S LEMON AVE #9718
WALNUT 91789 CA, US
🏠 CORPORATE ADDRESS: DELAWAREMinervaDB Inc.,
PO Box 2093 PHILADELPHIA PIKE #3339
CLAYMONT, DE 19703
🏠 CORPORATE ADDRESS: HOUSTON MinervaDB Inc., 1321 Upland Dr. PMB 19322, Houston,
TX 77043, US

 

The post Benchmarking MySQL 8.0 Performance on Amazon EC2 appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL Backup Strategies and Tools – MinervaDB Webinar https://minervadb.com/index.php/2020/06/19/mysql-backup-strategies-and-tools-minervadb-webinar/ Fri, 19 Jun 2020 08:58:44 +0000 http://minervadb.com/?p=4115 MinervaDB Webinar – MySQL Backup Strategies and Tools  Most often Database Systems outages happen due to user error and it is also the biggest reason for data loss / damage or corruption. In these type [...]

The post MySQL Backup Strategies and Tools – MinervaDB Webinar appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MinervaDB Webinar – MySQL Backup Strategies and Tools 

Most often Database Systems outages happen due to user error and it is also the biggest reason for data loss / damage or corruption. In these type of failures, It is application modifying or destroying the data on its own or through a user choice. Hardware failure also contributes to database infrastructure crashes and corruption. To address these sort of data reliability issues, you must recover and restore to the point in time before the corruption occurred. Disaster Recover tools returns the data to its original state at the cost of any other changes that were being made to the data since the point the corruption took place. MinervaDB founder and Principal, hosted a webinar (Thursday, June 18, 2020 – 06:00 PM to 07:00 PM PDT) on MySQL backup strategies and tools addressing the topics below:

  • Proactive MySQL DR – From strategy to execution
  • Building capacity for reliable MySQL DR
  • MySQL DR strategies
  • MySQL Backup tools
  • Managing MySQL DR Ops. for very large databases
  • Testing MySQL Backups
  • Biggest MySQL DR mistakes
  • MySQL DR Best Practices and Checklist

You can download the PDF (slides) of webinar here

☛ MinervaDB contacts for MySQL Database Backup and Database Reliability Engineering Services

Business FunctionContact
☎ CONTACT GLOBAL SALES (24*7)📞 (844) 588-7287 (USA)
📞 (415) 212-6625 (USA)
📞 (778) 770-5251 (Canada)
☎ TOLL FREE PHONE (24*7)📞 (844) 588-7287
🚩 MINERVADB FAX+1 (209) 314-2364
📨 MinervaDB Email - General / Sales / Consultingcontact@minervadb.com
📨 MinervaDB Email - Support support@minervadb.com
📨 MinervaDB Email -Remote DBAremotedba@minervadb.com
📨 Shiv Iyer Email - Founder and Principal shiv@minervadb.com
🏠 CORPORATE ADDRESS: CALIFORNIAMinervaDB Inc.,
340 S LEMON AVE #9718
WALNUT 91789 CA, US
🏠 CORPORATE ADDRESS: DELAWAREMinervaDB Inc.,
PO Box 2093 PHILADELPHIA PIKE #3339
CLAYMONT, DE 19703
🏠 CORPORATE ADDRESS: HOUSTON MinervaDB Inc., 1321 Upland Dr. PMB 19322, Houston,
TX 77043, US

 

The post MySQL Backup Strategies and Tools – MinervaDB Webinar appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL Backup and Disaster Recovery Webinar https://minervadb.com/index.php/2020/06/12/mysql-backup-and-disaster-recovery-webinar/ https://minervadb.com/index.php/2020/06/12/mysql-backup-and-disaster-recovery-webinar/#comments Fri, 12 Jun 2020 00:43:11 +0000 http://minervadb.com/?p=4105 MySQL Backup and Disaster Recovery Webinar (Thursday, June 18, 2020 – 06:00 PM to 07:00 PM PDT) There can be several reasons for a MySQL database outage: hardware failure, power outage, human error, natural disaster [...]

The post MySQL Backup and Disaster Recovery Webinar appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL Backup and Disaster Recovery Webinar

(Thursday, June 18, 2020 – 06:00 PM to 07:00 PM PDT)


There can be several reasons for a MySQL database outage: hardware failure, power outage, human error, natural disaster etc. We may not be able prevent all the disaster from happening but investing on a robust disaster recovery plan is very important for building fault-tolerant database infrastructure operations on MySQL.  Every MySQL DBA is accountable for developing a disaster recovery plan addressing data sensitivity, data loss tolerance and data security. Join Shiv Iyer, Founder and Principal of MinervaDB to lean about the best practices for building highly reliable MySQL DR strategy and operations on Thursday, June 18, 2020 – 06:00 PM to 07:00 PM PDT. Building DR for a high traffic MySQL database infrastructure means deep understanding of multiple backup strategies and choosing optimal ones which are best suited for performance and reliability. Most of the data intensive MySQL infrastructure will have a combination of multiple backup methods and tools, In this webinar Shiv talks about his experiences in the past and present on building MySQL DR Ops, tools and zero tolerance data loss methods.

Join this webinar to learn more about:

  • Proactive MySQL DR – From strategy to execution
  • Building capacity for reliable MySQL DR
  • MySQL DR strategies
  • MySQL Backup tools
  • Managing MySQL DR Ops. for very large databases
  • Testing MySQL Backups
  • Biggest MySQL DR mistakes
  • MySQL DR Best Practices and Checklist


 

 

The post MySQL Backup and Disaster Recovery Webinar appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
https://minervadb.com/index.php/2020/06/12/mysql-backup-and-disaster-recovery-webinar/feed/ 1
MySQL Backup Strategies – Building MySQL DR Solutions https://minervadb.com/index.php/2020/06/11/mysql-backup-strategies-building-mysql-solutions/ Thu, 11 Jun 2020 03:16:56 +0000 http://minervadb.com/?p=4070 MySQL Backup Strategies – What you should know before considering MySQL DR solutions ?  MySQL powers all the major internet properties, Which include Google, Facebook, Twitter, LinkedIn, Uber etc. So how do we plan for [...]

The post MySQL Backup Strategies – Building MySQL DR Solutions appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL Backup Strategies – What you should know before considering MySQL DR solutions ? 

MySQL powers all the major internet properties, Which include Google, Facebook, Twitter, LinkedIn, Uber etc. So how do we plan for MySQL disaster recovery and what are the most common MySQL DR tools used today for building highly reliable database infrastructure operations ? There can be several reasons for a MySQL database outage: hardware failure, power outage, human error, natural disaster etc. We may not be able prevent all the disaster from happening but investing on a robust disaster recovery plan is very important for building fault-tolerant database infrastructure operations on MySQL.  Every MySQL DBA is accountable for developing a disaster recovery plan addressing data sensitivity, data loss tolerance and data security. Functionally you have several database backup strategies available with MySQL:

  • Full backup – Full backup backs up the whole database, This also include transaction log so that the full database can be recovered after a full database backup is restored. Full database backups represent the database at the time the backup finished. Full backups are storage resource intensive and takes more time to finish. If you have for a large database, we strongly recommend to supplement a full database backup with a series of differential database backups.
  • Differential backup – A differential backup is based on the most recent, previous full data backup. A differential backup captures only the data that has changed since that full backup. The full backup upon which a differential backup is based is known as the base of the differential. Full backups, except for copy-only backups, can serve as the base for a series of differential backups, including database backups, partial backups, and file backups. The base backup for a file differential backup can be contained within a full backup, a file backup, or a partial backup. The differential backups are most recommended when the subset of a database is modified more frequently than the rest of the database.
  • Incremental backup – A incremental backup contains all changes to the data since the last backup. Both differential and incremental backup does only backing up changed files. But they differ significantly in how they do it, and how useful the result is.while an incremental backup only includes the data that has changed since the previous backup, a differential backup contains all of the data that has changed since the last full backup. The advantage that differential backup offers over incremental backups is a shorter restore time. Because, the backup has to be reconstituted from the last full backup and all the incremental backups since.

MySQL Backup tools

The following are the list of MySQL backup tools (logical and physical) discussed in this blog:

mysqldump

mysqldump is a MySQL client utility which can be used to perform logical backups  , The mysqldump generate output in SQL ( default and most commonly used to reproduce MySQL schema objects and data), CSV, other delimited text or XML format. We have copied below the restrictions of mysqldump:

  • mysqldump does not dump performance_schema or sys schema be default. To enforce dumping or logical backup of any of these schema objects, You have to explicitly mention them –databases option or if you want to just dump performance_schema use –skip-lock-tables option.
  • mysqldump does not dump the INFORMATION_SCHEMA schema.
  • mysqldump does not dump the InnoDB CREATE TABLESPACE statements.
  • mysqldump does not dump the NDB Cluster ndbinfo information database.
  • mysqldump includes statements required to recreate the general_log and slow_query_log tables for dumps of the mysql database. But, Log table contents are not dumped

Script to dump all the databases: 

shell> mysqldump --all-databases > all_databases.sql

Script to dump the entire database:

shell> mysqldump db_name > db_name_dump.sql

Script to dump several databases with one command:

shell> mysqldump --databases db_name1 [db_name2 ...] > databases_dump.sql

mysqlpump 

The mysqlpump is another client utility for logical backup of MySQL database like mysqldump which is capable of parallel processing of databases and other schema objects with databases to perform high performance dumping process, We listed below mysqlpump most compelling features:

  • MySQL dump with parallel processing capabilities for databases and other objects within databases.
  • MySQL user accounts will be dumped as account-management statements (CREATE USER, GRANT) rather than as inserts into the mysql system database.
  • By using mysqlpump you can create a compressed output.
  • Much faster compared to mysqldump. Because, The InnoDB secondary indexes are created after rows are inserted to the table.

P.S. – We have blogged about “How to use mysqlpump for faster MySQL logical backup ? here

MySQL Enterprise Backup 

MySQL Enterprise Backup is a hot / online backup tool for MySQL ( optimized for InnoDB only though capable of backup and restore of tables created on other storage engines supported by MySQL ) capable of performing full, incremental and differential backup. MySQL Enterprise Backup also support cloud storage backup, backup encryption and compression. We have explained most compelling MySQL Enterprise Backup 8.0 features below:
  • Transparent page compression for InnoDB.
  • Backup history available for all members of Group Replication by making sure backup_history table is updated on primary node after each mysqlbackup operation.
  • Storage engine of the mysql.backup_history table on a backed-up server has switched from CSV to InnoDB.
  • mysqlbackup now supports encrypted InnoDB undo logs .
  • mysqlbackup now supports high performance incremental backup by setting page tracking functionality on MySQL (set –incremental=page-track).
  • Much better MySQL Enterprise Backup 8.0 troubleshooting with now mysqlbackup prints a stack trace after being terminated by a signal.
  • Selective restores of tables or schema from full backup for Table-Level Recovery (TLR)

Percona XtraBackup 

Percona XtraBackup is an open source MySQL hot backup solution from Percona addressing incremental, fast, compressed and secured backup for InnoDB optimally. Most of our customers users Percona XtraBackup for DR of their MySQL infrastructure, The following features makes Percona XtraBackup obvious choice for MySQL Backup and DR:

  • Hot backup solution for InnoDB without blocking / locking transaction processing.
  • Point-in-time recovery for InnoDB.
  • MySQL incremental backup support.
  • Percona XtraBackup supports incremental compressed backups.
  • High performance streaming backup support for InnoDB.
  • Parallel backup and copy-back support for faster backup and restoration.
  • Secondary indexes defragmentation support for InnoDB.
  • Percona XtraBackup support rsync to minimize locking.
  • Track Percona XtraBackup history with Backup history table.
  • Percona XtraBackup supports offline backup.

Conclusion

We always recommend a combination of multiple backup strategies / tools for maximum data reliability and optimal restoration. We cannot have a common backup strategy for all the customers, It depends on factors like infrastructure, MySQL distribution, database size, SLA etc. Backups are most import components in database infrastructure operations and we follow zero tolerance DR for building highly available and fault-tolerant MySQL infrastructure.

Do you want to engage MinervaDB Remote DBA for MySQL Disaster Recovery (DR) and Database Reliability Engineering (Data SRE) ?

Business FunctionContact
☎ CONTACT GLOBAL SALES (24*7)📞 (844) 588-7287 (USA)
📞 (415) 212-6625 (USA)
📞 (778) 770-5251 (Canada)
☎ TOLL FREE PHONE (24*7)📞 (844) 588-7287
🚩 MINERVADB FAX+1 (209) 314-2364
📨 MinervaDB Email - General / Sales / Consultingcontact@minervadb.com
📨 MinervaDB Email - Support support@minervadb.com
📨 MinervaDB Email -Remote DBAremotedba@minervadb.com
📨 Shiv Iyer Email - Founder and Principal shiv@minervadb.com
🏠 CORPORATE ADDRESS: CALIFORNIAMinervaDB Inc.,
340 S LEMON AVE #9718
WALNUT 91789 CA, US
🏠 CORPORATE ADDRESS: DELAWAREMinervaDB Inc.,
PO Box 2093 PHILADELPHIA PIKE #3339
CLAYMONT, DE 19703
🏠 CORPORATE ADDRESS: HOUSTON MinervaDB Inc., 1321 Upland Dr. PMB 19322, Houston,
TX 77043, US

The post MySQL Backup Strategies – Building MySQL DR Solutions appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MinervaDB Webinar – Building MySQL Database Infrastructure for Performance and Reliability https://minervadb.com/index.php/2020/05/22/minervadb-webinar-building-mysql-database-infrastructure-for-performance-and-reliability/ https://minervadb.com/index.php/2020/05/22/minervadb-webinar-building-mysql-database-infrastructure-for-performance-and-reliability/#comments Fri, 22 May 2020 09:31:01 +0000 http://minervadb.com/?p=3945 MinervaDB Webinar – Building MySQL Database Infrastructure for Performance and Reliability Recently I did a webinar on ” Building MySQL Database Infrastructure for Performance and Reliability ” , It was big success and thought will [...]

The post MinervaDB Webinar – Building MySQL Database Infrastructure for Performance and Reliability appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MinervaDB Webinar – Building MySQL Database Infrastructure for Performance and Reliability

Recently I did a webinar on ” Building MySQL Database Infrastructure for Performance and Reliability ” , It was big success and thought will share the slides of webinar in this blog. I get lot of emails daily from Database Architects, DBAs, Database Engineers, Technical Managers and Developers worldwide on best practices and checklist to build MySQL for performance, scalability, high availability and database SRE, The objective of this webinar is to share with them a cockpit view of MySQL infrastructure operations from MinervaDB perspective. Database Systems are growing faster than ever, The modern datanomy businesses like Facebook, Uber, Airbnb, LinkedIn etc. are powered by Database Systems, This makes Database Infrastructure operationally complex and we can’t technically scale such systems with eyeballs. Building MySQL operations for web-scale means delivering highly responsive, fault-tolerant and self-healing database infrastructure for business. In this webinar we are discussing following topics:

  • Configuring MySQL for performance and reliability
  • Troubleshooting MySQL with Linux tools
  • Troubleshooting MySQL with slow query log
  • Most common tools used in MinervaDB to troubleshoot MySQL performance
  • Monitoring MySQL performance
  • Building MySQL infrastructure operations for performance, scalability and reliability
  • MySQL Replication

You can download PDF of the webinar here

The post MinervaDB Webinar – Building MySQL Database Infrastructure for Performance and Reliability appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
https://minervadb.com/index.php/2020/05/22/minervadb-webinar-building-mysql-database-infrastructure-for-performance-and-reliability/feed/ 1
Purging binary logs from MySQL Master safely https://minervadb.com/index.php/2018/05/14/purging-binary-logs-from-mysql-master-safely/ https://minervadb.com/index.php/2018/05/14/purging-binary-logs-from-mysql-master-safely/#comments Mon, 14 May 2018 14:51:51 +0000 http://minervadb.com/?p=1399 In this post we will discus about the different ways we can purge binary logs safely in MySQL, We recommend you to confirm before purging the binary logs from the master, all logs were applied [...]

The post Purging binary logs from MySQL Master safely appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
In this post we will discus about the different ways we can purge binary logs safely in MySQL, We recommend you to confirm before purging the binary logs from the master, all logs were applied to the slaves to avoid halting them. The following error is usual when binary log is purged before being applied on slave:

Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Could not open log file’

How can we safely purge MySQL binary log files ? 

  1. On each slave server, use SHOW SLAVE STATUS to check which log file it is reading.
  2. Get the binary log files details on the master with SHOW BINARY LOGS.
  3. Check for the earliest log file among all the slaves, This is the target file. If all the slaves are up to date, this is the last log file on the list.
  4. Make a backup of all log files you are about to delete (We insist this step to our customers to avoid human errors)
  5. Purge all log file up to but please do not include the target file.

The default binary log expiration is 30 days, You can get this details from MySQL system variable binlog_expire_logs_seconds . When using MySQL replication, You should specify an expiration period that no lower than maximum time your slaves might lag behind the master.

mysql> select @@binlog_expire_logs_seconds;
+------------------------------+
| @@binlog_expire_logs_seconds |
+------------------------------+
|                      2592000 |
+------------------------------+
1 row in set (0.00 sec)

List binary log files  in MySQL

mysql> SHOW BINARY LOGS;
+---------------+-----------+
| Log_name      | File_size |
+---------------+-----------+
| binlog.000001 |       657 |
| binlog.000002 |       178 |
| binlog.000003 |       178 |
| binlog.000004 |       178 |
| binlog.000005 |       178 |
| binlog.000006 |      3354 |
| binlog.000007 |       199 |
| binlog.000008 |       155 |
+---------------+-----------+
8 rows in set (0.00 sec)

mysql> 

** Both “SHOW BINARY LOGS” and “SHOW MASTER LOGS” are synonyms. **

Purging MySQL binary log files  using PURGE BINARY LOGS command 

The PURGE BINARY LOGS command deletes all the binary log files listed in the log index file prior to the specified log file name or date .

mysql> PURGE BINARY LOGS TO 'binlog.000001';
Query OK, 0 rows affected (0.01 sec)
mysql> PURGE BINARY LOGS BEFORE '2018-05-11 20:20:20';
Query OK, 0 rows affected, 1 warning (0.01 sec)

** ABOVE STATEMENTS HAS NO EFFECT IF THE MYSQL SERVER WAS NOT STARTED WITH –log-bin OPTION ENABLED

What you should be careful about before purging MySQL binary log files ? 

There are several ways to purge MySQL binary log files but none guarantee slave has already applied the binary log transactions and can be safely removed (Now, that’s the reason we have the title for this topic in red color ) , This is when “mysqlbinlogpurge” tool comes really helpful. The “mysqlbinlogpurge” tool is a part of MySQL utilities, You can download it from here . This tools ensures that any binary log files that in use or required by any of the slave in replication ecosystem will not be deleted.

How “mysqlbinlogpurge” finds when it is safe to purge binary log files ?

A MySQL slave has two entities to complete the replication successfully: the Slave_IO thread is accountable for collecting the events successfully from the master, While Slave_SQL threads(s) is responsible for executing the events locally. To monitor Slave IO / Slave SQL is running successfully and where they are at in their process, you have to run the command ” SHOW SLAVE STATUS

mysql > show slave statusG
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.3
Master_User: India
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000047
Read_Master_Log_Pos: 374
Relay_Log_File: mysql-relay.000713
Relay_Log_Pos: 45793012
Relay_Master_Log_File: mysql-bin.000038
<strong>Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
</strong>Exec_Master_Log_Pos: 45792781

The following are important matrices / parameters and their descriptions:

Master_Log_File / Read_Master_Log_Pos – This is what Slave_IO is currently fetching from the master.

Relay_Master_Log_File / Exec_Master_Log_Pos – This is what Slave_SQL thread is currently executing in terms of the Masters coordinates (master’s log file).

Relay_Log_File / Relay_Log_Pos – This is what the SQL thread is currently executing in terms of the Slave’s coordinates (relay log file)

The Master_Log_File is the latest binlog file on MySQL master that Slave_IO reads from and it is this file, and any files after this on the Master server, that we must preserve for successful completion of replication. The Relay_Log_File is the point of execution in MySQL Master’s binlog that Slave_SQL thread has successfully executed.

How to use “mysqlbinlogpurge” for purging MySQL binary log files ? 

We recommend our customers to use –dry-run option with mysqlbinlogpurge” to check what tool is going to deliver :

** if ever slave is stopped, “mysqlbinlogpurge” tool will report error and stop purging binary log files:

$ mysqlbinlogpurge --master=root:india@192.168.56.3:3306 
>           --slaves=root:singapore@192.168.56.4:3306,root:srilanka@192.168.56.5:3306 
>           --dry-run
ERROR: Can not verify the status for slave singapore@192.168.56.4:3306. Make sure the slave are active and accessible.

You can check what the “mysqlbinlogpurge” is going to perform before executing, you can use the –dry-run option:

$ mysqlbinlogpurge --master=root:root@192.168.56.3:3306 --slaves=root:root@192.168.56.4:3306,root:root@192.168.56.5:45009 --dry-run
# Latest binlog file replicated by all slaves: mysql-bin.000481
# To manually purge purge the binary logs Execute the following query:
PURGE BINARY LOGS TO 'mysql-bin.000482'

** To remove binary log file, you just need to remove the –dry-run option.

mysqlbinlogpurge can occasionally go wrong under following circumstances :

  • Not reliable when used in Multi-Source replication ecosystem.
  • If slave corrupts the local relay log, We need to restart replication from Relay_Master_log_file, and mysqlbinlogpurge might already have executed the purge of required binlog .

Summary 

We caution our customers who regularly purge their binary log files on being reasonably certain that relay logs won’t be corrupted . We don’t recommend mysqlbinlogpurge multi-source replication ecosystem.

The post Purging binary logs from MySQL Master safely appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
https://minervadb.com/index.php/2018/05/14/purging-binary-logs-from-mysql-master-safely/feed/ 2
Vacation DBA Services https://minervadb.com/index.php/2018/03/27/vacation-dba-services/ Tue, 27 Mar 2018 17:22:47 +0000 http://minervadb.com/?p=1208 DBA job in an large internet property or technology company is highly stressful and often they end-up working extended working hours (occasionally weekends also)  Corporations globally are committed to guaranteeing maximum work-life balance for their [...]

The post Vacation DBA Services appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
DBA job in an large internet property or technology company is highly stressful and often they end-up working extended working hours (occasionally weekends also)  Corporations globally are committed to guaranteeing maximum work-life balance for their DBAs, Hiring a Sr. level DBA is expensive and exhaustive so retaining your DBA is very important, So how can we help you in delivering uninterrupted DBA services 24*7*365 even when your DBA is on vacation ? We are pioneers in delivering 24*7*365 remote DBA services, guaranteeing optimal, scalable, highly available and reliable database infrastructure operations.

What you can expect from subscribing to our Vacation DBA services ?

  • Elite-class global team of DBA available for you 24*7.
  • Database infrastructure operations performance monitoring 24*7.
  • Vendor neutral and independent DBA services – MySQL, MariaDB, MyRocks and Percona Server.
  • MySQL installation and configuration.
  • MySQL performance benchmarking.
  • MySQL capacity planning and sizing.
  • MySQL performance optimization and tuning.
  • SQL and Index optimization.
  • Disk I/O optimization.
  • MySQL troubleshooting.
  • MySQL database recovery services.
  • MySQL high availability solutions.
  • MySQL upgrades.
  • Emergency DBA support and On-call DBA services – When you need us, we are available on-call (24*7).

When customers usually subscribe for vacation DBA services  ?

  • Resident DBA left the company and business needs DBA coverage till they hire new DBA.
  • Resident DBA is on vacation – Companies guarantee great work-life balance to the team, It’s not professional calling DBA for support when he/she is on an vacation.
  • Leverage with external DBA team for 24*7 MySQL support.
  • You need a expert DBA coverage for an limited period.
  • Your website traffic is very high (usually for holidays / new year etc.) and you need highly responsive 24*7 DBA support.

☛ Why our customers love working with us ?

  • Global team – We have expert MySQL consultants operating 24*7*365 from multiple locations worldwide.
  • Vendor neutral and independent – Experts in MySQL, MariaDB, Percona Server and ClickHouse.
  • We are available on a short notice for emergency DBA support services.
  • No long-term contract option available – You can hire us for as-low-as 40 hours.
  • We bill you only for the hours worked, Discounts available for advanced booking (only for vacation DBA services).
  • Performance benchmarking – We do stress testing of the system proactively to avoid incidents which can directly impact your business.
  • Capacity planning and sizing – Not more nor less, We size your systems optimally and this include recommendations on CPU, memory, storage and network.
  • Performance health check, diagnostics and forensics – We will be first the one to know your performance bottleneck and fix before it become ugly.
  • Performance optimization and tuning – We do full-stack optimization which include Linux, MySQL and PHP also
  • Disk I/O tuning – We are experts in designing optimal storage infrastructure architecture and disk I/O distribution.
  • SQL tuning – We are experts in re-writing your SQL for performance, Indeed we often see the major performance improvements by just tuning expensive SQL.
  • Designing optimal schema, indexes and SQL – Design and build optimal schema and SQL for performance and scalability.
  • Partitioning and archiving solutions –  Building systems horizontally scalable for web-scale platforms.
  • Scale-out and replication solutions We build horizontally scalable systems which are highly available too.
  • Sharding and horizontal partitioning solutions – Building systems horizontally scalable and reliable across multiple-DC for web-scale platforms.
  • Clustering solutions – Grow your MySQL infrastructure horizontally for performance, scalability and reliability.
  • High Availability and SRE – Architecting and building highly available and reliable database infrastructure operations  for web-scale.
  • Data recovery services – Building robust disaster recovery solutions, zero data loss systems and multi-location backup retention.
  • Database upgrades and migration – Seamless upgrades and migration of database infrastructure on zero downtime.

☛ Technology focus – Vendor neutral and independent

Technology FocusTools and Technologies
Linux Ubuntu, Debian, CentOS, Red Hat Linux, Oracle Linux and SUSE Linux.
MySQLMySQL GA, MySQL Enterprise, InnoDB, MySQL Enterprise Backup, MySQL Cluster CGE, MySQL Enterprise Monitor, MySQL Utilities, MySQL Enterprise Audit, MySQL Enterprise Firewall and MySQL Router.
Percona Percona Server for MySQL, XtraDB, TokuDB, RocksDB, Percona Toolkit, Percona XtraBackup and PMM(Percona Monitoring & Management).
MariaDBMariaDB Server, RocksDB, MariaDB Galera Cluster, MariaDB Backup, MariaDB MaxScale and MariaDB ColumnStore.
PostgreSQLPostgreSQL Performance Benchmarking, Capacity Planning / Sizing, PostgreSQL Performance Optimization, PostgreSQL High Availability / Database Reliability Engineering, PostgreSQL Upgrades / Migration and PostgreSQL Security
Cloud DBA Services IaaS and DBaaS including: Oracle Cloud, Google CloudSQL, Amazon Aurora, AWS RDS®, EC2®, Microsoft Azure® and Rackspace® Cloud
Performance Monitoring and Trending PlatformsMySQL Enterprise Monitor, Icinga, Zabbix, Prometheus and Grafana.
High Availability, Scale-Out, Replication and Load BalancerMySQL Group Replication, MySQL Cluster CGE, InnoDB Cluster, Galera Cluster, Percona XtraDB Cluster, MariaDB MaxScale, Continuent Tungsten Replicator, MHA (Master High Availability Manager and tools for MySQL), HAProxy, ProxySQL, MySQL Router and Vitess.
Columnar Database SystemsClickHouse, MariaDB ColumnStore
DevOps. and Automation Vagrant, Docker, Kubernetes, Jenkins, Ganglia, Chef, Puppet, Ansible, Consul, JIRA, Graylog and Grafana.

☛ MinervaDB Remote DBA plans

Remote DBA Plan
Rate
( plus GST / Goods and Services Tax where relevant )
On-Demand Remote DBA
(8 hours Remote DBA per month)
US $1,600 / month
Quarter DBA
(40 hours of remote DBA services per month)
US $6,000 / month
Half DBA
(80 hours of remote DBA services per month)
US $10,000 / month
Full DBA
(160 hours of remote DBA services per month)
US $16,000 / month
The Ultimate DBA
(Remote DBA services for 24*7*365)
US $54,000 / month

☛ Customer testimonials

” Shiv is a expert in MySQL performance, He can fine tune MySQL performance at instance, application and infrastructure level in a shortest duration, I would love to hire him again “

David  Hutton
Head of IT operations
National Geographic

” If it’s about MySQL performance and scalability, I will first call Shiv and He has helped us several times in building optimal, scalable and highly available MySQL infrastructure operations 

Mark Gray
  IT Manager
Nike Technologies

” If you are building an highly reliable MySQL ecosystem, Hiring Shiv and his team will simplify your project. He is a guru to build an highly available and fault tolerant web property “ 

Kevin Thomson
Business Head – Media properties
AOL

” Shiv and his team built an custom MySQL high availability solution for us across data centers which enabled 24*7*365 availability of our business services. His Soultions are non vendor biased and cost efficient “

Keshav Patel
Group Manager – IT
Lastminute.com 

” Thinking about outsourcing your DBA function ? Shiv is the guy who you should be talking to, He can build an highly reliable 24*7 remote DBA team for an fraction of cost to hiring a Sr. level resident DBA “

Brian Lewis
Lead Systems Engineer
Priceline.com  

” The shortest emergency DBA support provider I have ever worked with, They are highly responsive and professional. If we suspect something going wrong with our database systems, The immediate action item is contact Shiv and his team”

Sherly Williams
Manager -Business Continuity
GAP Inc. 

” We have contracted MinervaDB for 24*7 remote DBA services, They delivered MySQL maximum reliability and availability solutions ahead of the project schedule using 100% open source and free tools, saving considerably our IT budget. “

Simon Matthew
IT Manager – Media & Entertainment
Vodafone PLC 

The post Vacation DBA Services appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL Performance Audit, Health Check, Diagnostics and Forensics By MinervaDB https://minervadb.com/index.php/2018/01/11/mysql-performance-audit/ Thu, 11 Jan 2018 13:27:41 +0000 http://minervadb.com/?p=612 We almost daily do MySQL Performance Audit, Health Check, Diagnostics and Forensics for some customer, We are pioneers in architecting and build optimal and scalable MySQL infrastructure operations. To know more about MinervaDB MySQL high performance [...]

The post MySQL Performance Audit, Health Check, Diagnostics and Forensics By MinervaDB appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
We almost daily do MySQL Performance Audit, Health Check, Diagnostics and Forensics for some customer, We are pioneers in architecting and build optimal and scalable MySQL infrastructure operations. To know more about MinervaDB MySQL high performance consulting practice, please download our flyer here

The post MySQL Performance Audit, Health Check, Diagnostics and Forensics By MinervaDB appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
Mass killing of MySQL connections / processes https://minervadb.com/index.php/2018/01/06/mass-killing-of-mysql-connections-processes/ Sat, 06 Jan 2018 10:01:27 +0000 http://minervadb.com/?p=581 Sometimes we may have to kill several MySQL connections / processes, How can we do that effortlessly ? We have to first list down the connections you want to kill with ” SHOW FULL PROCESSLIST [...]

The post Mass killing of MySQL connections / processes appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
Sometimes we may have to kill several MySQL connections / processes, How can we do that effortlessly ? We have to first list down the connections you want to kill with ” SHOW FULL PROCESSLIST ” (Query 1 ), The Query 2 below will do mass killing MySQL connections / processes quickly .

Query 1

mysql> SHOW FULL PROCESSLIST\G;

*************************** 1. row ***************************

     Id: 3

   User: root

   Host: localhost

     db: NULL

Command: Query

   Time: 0

  State: NULL

   Info: SHOW FULL PROCESSLIST

*************************** 2. row ***************************

     Id: 15008

   User: root

   Host: localhost

     db: mysqlslap

Command: Sleep

   Time: 0

  State: 

   Info: NULL

*************************** 3. row ***************************

     Id: 19759

   User: root

   Host: localhost

     db: mysqlslap

Command: Query

   Time: 0

  State: query end

   Info: INSERT INTO t1 VALUES (95275444,'bNIrBDBl81tjzdvuOpQRCXgX37xGtzLKEXBIcE3k7xK7aFtqxC99jqYnpTviK83bf6lGDgsKd4R3KLmHPnI8TqnIKj1gjw7N2sXFZNS2Svyg8cpZN7atxL39w4igsp')

*************************** 4. row ***************************

     Id: 19760

   User: root

   Host: localhost

     db: mysqlslap

Command: Sleep

   Time: 0

  State: 

   Info: NULL

*************************** 5. row ***************************

     Id: 19761

   User: root

   Host: localhost

     db: mysqlslap

Command: Query

   Time: 0

  State: query end

   Info: INSERT INTO t1 VALUES (95275444,'bNIrBDBl81tjzdvuOpQRCXgX37xGtzLKEXBIcE3k7xK7aFtqxC99jqYnpTviK83bf6lGDgsKd4R3KLmHPnI8TqnIKj1gjw7N2sXFZNS2Svyg8cpZN7atxL39w4igsp')

*************************** 6. row ***************************

     Id: 19762

   User: root

   Host: localhost

     db: mysqlslap

Command: Query

   Time: 0

  State: query end

   Info: INSERT INTO t1 VALUES (95275444,'bNIrBDBl81tjzdvuOpQRCXgX37xGtzLKEXBIcE3k7xK7aFtqxC99jqYnpTviK83bf6lGDgsKd4R3KLmHPnI8TqnIKj1gjw7N2sXFZNS2Svyg8cpZN7atxL39w4igsp')

*************************** 7. row ***************************

     Id: 19763

   User: root

   Host: localhost

     db: mysqlslap

Command: Query

   Time: 0

  State: query end

   Info: INSERT INTO t1 VALUES (95275444,'bNIrBDBl81tjzdvuOpQRCXgX37xGtzLKEXBIcE3k7xK7aFtqxC99jqYnpTviK83bf6lGDgsKd4R3KLmHPnI8TqnIKj1gjw7N2sXFZNS2Svyg8cpZN7atxL39w4igsp')

The query below get you the script for mass killing of  MySQL in one key stroke , I usually use this when I am suspecting something unacceptable is happening in MySQL.

Query 2
mysql> select concat('KILL ',id,';') from information_schema.processlist where user='root';

+------------------------+

| concat('KILL ',id,';') |

+------------------------+

| KILL 21159;            |

| KILL 21158;            |

| KILL 21157;            |

| KILL 21156;            |

| KILL 21155;            |

| KILL 21154;            |

| KILL 21153;            |

| KILL 21152;            |

| KILL 21151;            |

| KILL 21150;            |

| KILL 21149;            |

| KILL 21148;            |

| KILL 21147;            |

| KILL 21146;            |

| KILL 21145;            |

| KILL 21144;            |

| KILL 21143;            |

| KILL 21142;            |

| KILL 21141;            |

| KILL 21140;            |

 

mysql> select concat('KILL ',id,';') from information_schema.processlist where user='root' into outfile '/var/lib/mysql-files/kill-mysql-conn.txt';

Query OK, 1 row affected (0.00 sec)

mysql> source /var/lib/mysql-files/kill-mysql-conn.txt

 

The post Mass killing of MySQL connections / processes appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
The Commandments for Optimal MySQL Performance https://minervadb.com/index.php/2017/10/29/the-commandments-for-optimal-mysql-performance/ Sun, 29 Oct 2017 06:32:02 +0000 http://minervadb.com/?p=82 What we have to keep in mind for an Optimal MySQL Performance ? There are many, I am just writing down what I seriously consider for an Optimal and Scalable MySQL Performance, As you usual [...]

The post The Commandments for Optimal MySQL Performance appeared first on The WebScale Database Infrastructure Operations Experts.

]]>

What we have to keep in mind for an Optimal MySQL Performance ? There are many, I am just writing down what I seriously consider for an Optimal and Scalable MySQL Performance, As you usual the comments are most welcome, Thank you !!

  1. Go generous while buying physical memory, InnoDB works great when files are accessed from memory rather than from disk.
  2. Lean MySQL Schema and SQL works great. Trust me, The fat is not Optimal everywhere !!
  3. Carefully choose your Datatype, The smaller ones are better.
  4. You need Indexes to search records faster but Index overuse / abuse will have negative impact to performance, Remove unused indexes.
  5. Occasionally MySQL go wrong in choosing Optimal Indexes, Here help MySQL using hints like “USE INDEX”.
  6. Think seriously about indexing columns in WHERE, GROUP BY, and ORDER BY queries.
  7. Less Rows Examined is great !!!
  8. Reduce disk reads, Compress TEXT, BLOB
  9. Make incremental Schema changes sometimes small changes cause severe Performance improvements / degradation.
  10. Lookout for duplicate records they seriously cause Performance Bottlenecks.
  11. Archive the old records, They make Sort / Search especially very expensive.
  12. Profile your MySQL regularly to define the trending chart of Performance, Nothing goes wrong overnight, Performance degradation happens in several cases over a period of time so think proactive, That’s cool 🙂
  13. The fat multi-core processors hyper-threading enabled works great for high performance MySQL operations
  14. Watch out for excessive pagination queries.
  15. Go conservative about MySQL Configs (sometimes less is more).
  16. Be cautious with MySQL configuration parameters innodb_thread_concurrency and thread_concurrency variables, Don’t use them if you don’t clearly understand how they work !!
  17. High max_connections excessively consumes the RAM.
  18. Use query cache only if you have repetitive queries, Using query cache on data that changes often will give you a performance hit.
  19. Remember to warm your MySQL Database in every restart, This get schema, SQL back to memory.
  20. Fetch only the data you need in SELECT queries
  21. Consider persistent connection against multiple connections
  22. Sort_buffer_size  eat memory very fast because it is actually consumed per connection so please be very cautious while increasing it.
  23. Use large redo logs
  24. Measure cost of query with Response Time, Use MySQL slow query log to diagnose query performance.
  25. I use SHOW PROCESSLIST while load increases, This works good for me during diagnostics / forensics of slow queries.
  26. Use Performance Schema wisely, This is an great MySQL performance orchestration platform.
  27. Avoid using Triggers as much as possible.
  28. Use ARCHIVE Storage engine for audit purposes.
  29. You need Backups but do that on a secondary Replication Instance, This actually is a quick win to boost the Performance of your MySQL Primary Master Instance.
  30. Split reads across several instances / disk, This helps distributing load efficiently

The post The Commandments for Optimal MySQL Performance appeared first on The WebScale Database Infrastructure Operations Experts.

]]>