MySQL Tech-Feed (en)

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 

Other example

Shinguz - Wed, 2020-06-10 11:06

Trx # 86153878218 exists in both Galera Cluster conflics which are 46 seconds apart (= long running transaction?). Table `rt3`.`Tickets` seems to be involved in both cases. One should investigate also in this query or transaction we cannot see here...

MySQL thread id 6147, OS thread handle 0x7f5af77fe700, query id 5394536 192.168.1.42 node1
*** WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 67799 page no 2924419 n bits 136 index `PRIMARY` of table `rt3`.`Tickets` trx id 86153787673 …

Taxonomy upgrade extras: 

Stupid Error Messages

Shinguz - Fri, 2020-05-22 11:02

Very often I see some stupid error messages as a (power-)user. I do not know if this is because of lazy developers or managers not having enough focus on more useful error messages.

If the error messages would be more clear it would help me as a power-user to fix my problems faster and fix it possibly myself instead of asking questions or even open support cases.

That would also safe costs on the support service side if end-users would be enabled to fix their problems themself. If this is what software …


Taxonomy upgrade extras:  Error  Developer  Software 

FromDual Ops Center for MySQL and compatible databases 1.0.0 has been released

Shinguz - Mon, 2020-05-11 15:58

FromDual has the pleasure to announce the release of the new version 1.0.0 of its popular FromDual Ops Center focmm, a Graphical User Interface (GUI) for MySQL and compatible databases.

The FromDual Ops Center for MySQL and compatible databases (focmm) helps DBA’s and System Administrators to better manage their MySQL and compatible databases farms. Ops Center makes DBA and Admins life easier!

The main task of Ops Center is to support you in your daily MySQL and compatible databases operation tasks. …


Taxonomy upgrade extras:  Operations  Release  Fromdual Ops Center  Ops Center  Dbaas  Focmm 

See also SElinux

Shinguz - Wed, 2020-04-29 11:26
cd /var/log
ll -d -Z mysql* mysql/*
mkdir mysql
chown mysql: mysql
semanage fcontext -a -t mysqld_db_t "/var/log/mysql/(/.*)?"
restorecon -Rv /var/log/mysql
ll -d -Z mysql* mysql/*

And Non-standard database set up with SELinux


Taxonomy upgrade extras: 

Testing Logrotate

Shinguz - Wed, 2020-04-29 11:22
/usr/sbin/logrotate /etc/logrotate.conf

Taxonomy upgrade extras: 

Pages

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