MySQL Tech-Feed (en)

Partial Restore of a Table into a MariaDB Galera Cluster

Shinguz - Fri, 2020-11-20 15:08

In my former Blog Post Partial Table or Schema restore from mariabackup full backup we worked out the basics of a partial restore of a table into a MariaDB database instance.

An now we use this know-how to try the same procedure on a Galera Cluster.

The backup is done in the exact same way as described in the mentioned article. We can even use the backup made there.

For the restore we use the following procedure:

Prepare and Restore a table

# BACKUPDIR="/home/mysql/bck/qamariadb105/daily"
# …

Taxonomy upgrade extras:  Backup  Restore  Schema  Database  Physical Backup  Mariabackup  Table Restore  Schema Restore  Partial Restore  Database Restore 

Partial Table or Schema restore from mariabackup full backup

Shinguz - Wed, 2020-11-11 21:59

For me it was for a long time not clear if a mariadb-backup full backup can be used to do partial table or schema restores. Now we faced this challenge with a customer. So time to try it out…

This test was made with MariaDB 10.5.5. So it may not work with some older MariaDB releases…

Backup

Because I do not know during the backup if I need a full or a partial restore I always want to do a full mariadb-backup backup!

The full backup can be done as normal but the prepare should not be done yet …


Taxonomy upgrade extras:  Backup  Restore  Schema  Database  Physical Backup  Mariadb-Backup  Table Restore  Schema Restore  Partial Restore  Database Restore 

MariaDB MaxScale Configuration Variables

Shinguz - Wed, 2020-11-04 22:49

Table of Contents

Global Options

VariableVersionsValuesDefaultUnitComment
threads1.4 2.32.42.5{ <n> | auto }1thread 
thread_stack_size 2.2   <n>  Ignored and deprecated in 2.3
rebalance_period    2.5<n>0second 
rebalance_threshold    2.5<n>20delta load 
rebalance_window    2.5<n>10second …

Taxonomy upgrade extras:  MariaDB  Maxscale  Configuration  Variables  Load Balancer 

FromDual Backup and Recovery Manager for MariaDB and MySQL 2.2.2 has been released

Shinguz - Wed, 2020-10-14 14:22

FromDual has the pleasure to announce the release of the new version 2.2.2 of its popular Backup and Recovery Manager for MariaDB and MySQL (brman).

The new FromDual Backup and Recovery Manager can be downloaded from here. The FromDual Repositories were updated. How to install and use the Backup and Recovery Manager is describe in FromDual Backup and Recovery Manager (brman) installation guide.

In the inconceivable case that you find a bug in the FromDual Backup and Recovery Manager please report it to the …


Taxonomy upgrade extras:  Backup  Restore  Recovery  Pitr  Brman  Release  Bman  Rman  Fromdual Backup and Recovery Manager 

SQL Query Tuning - Performance

Shinguz - Mon, 2020-10-05 16:13

How could the following SQL queries be improved performance wise and otherwise and can you also explain why your change is more optimal?

Please consider, when testing, that your results are not confused by the Query Cache or by reading data from your I/O system which are an order of magnitude faster (Query Cache) or slower (I/O) than the in-memory behaviour.

Table of Contents


Taxonomy upgrade extras:  Query  Tuning  Optimizer  Sql  Performance 

Creating synthetic data sets for tuning SQL queries

Shinguz - Fri, 2020-10-02 16:50

When it comes to SQL Query tuning with customers we often get the slow running SQL query and possibly, in good cases, also the table structure. But very often, for various reasons, we do not get the data.

SQL query tuning on an empty table or a table with only little data is not really fun because either the results of the optimizer have nothing to do with reality or the response times do not really show if your change has improved anything. For example if your query response time before the change was 2 ms …


Taxonomy upgrade extras:  Performance  Tuning  Query  Optimizer  Sql  Explain  Optimizing  Query Tuning  Performance Tuning  Data 

Kernel Documentation

Shinguz - Thu, 2020-09-24 10:19

And this is what the Linux kernel documentation says about it: https://www.kernel.org/doc/Documentation/networking/bonding.txt


Taxonomy upgrade extras: 

MyISAM locking and who is the evil?

Shinguz - Wed, 2020-09-23 09:58

Yes, I know, MyISAM is deprecated and unofficially discontinued by the vendors. But we still have from time to time customers using MyISAM and even evangelize for MyISAM…

And to be honest in some cases MyISAM has even advantages (beside some huge disadvantages) over other Storage Engines (simple file copy, footprint, single-query latency, …). But most of our customers are not aware of these advantages and are using MyISAM just because they did it since ever…

One of the biggest problems …


Taxonomy upgrade extras:  Myisam  Lock  Locking 

Good explanation for bond interfaces

Shinguz - Wed, 2020-09-23 09:14

802.3ad bond interface have show high RX dropped packets

I found a god explanation for dropped packages on bonded interfaces: [ 1 ]

This is related to the bonding mode and _not_ a bug. The bonding module will drop duplicate frames received on inactive ports, which is normal behaviour. Overall the packets should be getting into the machine without problems since they are received on the active slave. To confirm this do the following

1) Check dropped packets from all interfaces. So if eth0/eth1 are …


Taxonomy upgrade extras: 

MariaDB and MySQL package holding or locking

Shinguz - Fri, 2020-08-07 16:02

Repositories from your favourite Linux distribution and from your favourite database software vendor get regular package updates. If you do periodic system upgrades (for example every 2 weeks as we do) you get the newest packages of a release series.
Unfortunately recently the software vendors started not only to fix bugs in new releases but also to introduce new features. And when you fix bugs or introduce new stuff new bugs might appear.
To avoid being hit unexpectedly by new bugs you do not want to …


Taxonomy upgrade extras:  Debian  Ubuntu  Centos  Package  Upgrade  Lock  Locking  Hold  Redhat  Pin  Red Hat 

MariaDB SQL Error Log Plugin

Shinguz - Thu, 2020-07-30 12:26

When you are for too long in business you think you know already everything and you are getting lazy. This happened to me again a few weeks ago. A customer asked me about the SQL Error Log Plugin. First I though he was talking about the MariaDB Error Log or the General Query Log. But then I have learned that there is something “new” I did not know yet…

MariaDB introduced in 5.5.22 (March 2012) a new plugin called the SQL Error Log Plugin. This Plugin collects all the errors which were …


Taxonomy upgrade extras:  MariaDB  Sql  Error  Logging  Error Log  Syntax 

FromDual Ops Center File Transfer

Shinguz - Tue, 2020-07-28 09:59

With the FromDual Ops Center file transfer tool you can easily upload files from your personal computer to the focmm machine, download files from the focmm machine to your personal computer or transfer files from the focmm machine to any of your database machines or between them. This feature is made for importing, exporting or transferring data from, to or between your different database instances. For example to copy a production schema to a testing database instance.

For backup and restore of a database …


Taxonomy upgrade extras:  Focmm  Fromdual Ops Center  File  File Transfer 

Centralized Crontab with FromDual Ops Center

Shinguz - Thu, 2020-07-23 11:18

One of the tools of FromDual Ops Center for MariaDB and MySQL is the centralized crontab for all of your database machines. Instead of maintaining various different crontabs on different machines you can manage them now in one place within the Ops Center.

Under the Tools menu on the left you find Crontab. Here you get a first overview of crontab jobs available:

Tools/Crontab
  • The first column shows if the crontab job is active or not.
  • The second column indicates the O/S user the crontab job should run as.
  • Then we have …

Taxonomy upgrade extras:  Focmm  Fromdual Ops Center  Crontab  Centralization 

WMware snapshots or Veeam backups

Shinguz - Wed, 2020-07-22 16:02

We have found a strong correlation between VMware snapshots and Veeam backups and those dropped packets.


Taxonomy upgrade extras: 

InnoDB full-text index corruption

Shinguz - Wed, 2020-07-08 21:52

In a recent customer engagement we experienced a lot of corrupted (normal) indexes and also corrupted full-text indexes on InnoDB tables in a Galera Cluster (v10.4.13).

In the error log we did not see which table it was but we have only a few log entries every here and there indicating a full-table index is corrupt:

2020-07-08 22:09:03 0 [ERROR] InnoDB: (Duplicate key) writing word node to FTS auxiliary index table.
2020-07-08 22:09:06 0 [ERROR] InnoDB: (Duplicate key) writing word node to FTS auxiliary …

Taxonomy upgrade extras:  Innodb  Full-Text  Index  Corruption  Index File 

Increase file limit of a running process

Shinguz - Fri, 2020-06-19 18:53

Asking stupid questions and googling for them is fun some times…

Today I was asking myself if one could rise the file limit for a running MariaDB mysqld process online without restarting the database instance?

And I found an answer on serverfault: Set max file limit on a running process:

PID=$(pidof mysqld)

grep -e 'Max open files' -e Limit /proc/${PID}/limits 
Limit                     Soft Limit           Hard Limit           Units     
Max open files            1024                 4096 …

Taxonomy upgrade extras:  Open_files_limit  Limitnofile  File Handles 

New Warning: P_S Metadata Lock instrumentation is disabled

Shinguz - Fri, 2020-06-19 09:17

With this new version of fpmmm you probably get a new warning in your fpmmm error log:

INFO: FromDual Performance Monitor for MySQL and MariaDB (fpmmm) (1.2.0) run started.
WARN:     P_S Metadata Lock instrumentation is disabled. (rc=1411)
INFO: FromDual Performance Monitor for MySQL and MariaDB (fpmmm) run finished (rc=0).

In this fpmmm release we start monitoring MariaDB/MySQL Metadata locking problems. For this new functionality the Metadata locking plugin in MariaDB or the Metadata …


Taxonomy upgrade extras: 

Remote Syslog Server

Shinguz - Tue, 2020-06-16 17:56

Sources:

This notes are intended for Ubuntu 18.04!

Install and Configure Rsyslog Server

dpkg -l | grep rsyslogd
apt-get update && apt-get install rsyslog

systemctl start rsyslog
systemctl enable rsyslog
systemctl status rsyslog

Check rsyslog version (v7 vs. v8!):

rsyslogd -v

General configuration

#
# /etc/rsyslog.conf
#

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" …

Taxonomy upgrade extras:  Syslog  Logging 

FromDual Performance Monitor for MariaDB 1.2.0 has been released

Shinguz - Fri, 2020-06-12 16:47

FromDual has the pleasure to announce the release of the new version 1.2.0 of its popular Database Performance Monitor for MariaDB and Galera Cluster fpmmm.

The FromDual Performance Monitor for MariaDB (fpmmm) enables DBAs and System Administrators to monitor and understand what is going on inside their MariaDB database instances and on the machines where the databases reside.

More detailed information you can find in the fpmmm Installation Guide.

Download

The new FromDual Performance Monitor for MariaDB ( …


Taxonomy upgrade extras:  Performance  Monitor  Monitoring  Fpmmm  Maas  Release  Graph 

FromDual Performance Monitor for MySQL 1.2.0 has been released

Shinguz - Fri, 2020-06-12 16:42

FromDual has the pleasure to announce the release of the new version 1.2.0 of its popular Database Performance Monitor for MySQL fpmmm.

The FromDual Performance Monitor for MySQL (fpmmm) enables DBAs and System Administrators to monitor and understand what is going on inside their MySQL database instances and on the machines where the databases reside.

More detailed information you can find in the fpmmm Installation Guide.

Download

The new FromDual Performance Monitor for MySQL (fpmmm) can be downloaded …


Taxonomy upgrade extras:  Performance  Monitor  Monitoring  Fpmmm  Maas  Release  Graph 

Pages

Subscribe to FromDual aggregator - MySQL Tech-Feed (en)