Shinguz's blog

Partial Table or Schema restore from mariabackup full backup

For me it was for a long time not clear if a mariabackup 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…

MariaDB MaxScale Configuration Variables

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 
auth_connect_timeout1.42.22.32.4 <n>3second 
auth_read_timeout1.42.22.32.4 <n>1secondDeprecated in 2.5
auth_write_timeout1.42.22.32.4 <n>2secondDeprecated in 2.5
query_retries  2.32.42.5<n>1timeAdded in 2.1.10, disabled by default until 2.3.0
query_retry_timeout  2.32.42.5 5  
passive  2.32.42.5 false  
ms_timestamp1.4 2.32.42.5{ 0 | 1 }0- 
skip_permission_checks  2.32.42.5{ 0 | 1 }0  
syslog1.4 2.32.42.5{ 0 | 1 }1- 
maxlog1.4 2.32.42.5{ 0 | 1 }1- 
log_to_shm1.4    { 0 | 1 }0-Deprecated and ignored in 2.3.0 and newer
log_warning1.4 2.32.42.5{ 0 | 1 }1- 
log_notice1.4 2.32.42.5{ 0 | 1 }1- 
log_info1.4 2.32.42.5{ 0 | 1 }0- 
log_debug1.4 2.32.42.5{ 0 | 1 }0- 
log_warn_super_user    2.5 false  
log_messages        Deprecated, use log_notice instead
log_trace        Deprecated, use log_info instead
log_augmentation1.4 2.32.42.5{ 0 | 1 }0- 
log_throttling  2.32.42.5{ <n>, <n>, <n> }10, 1000, 10000time, millisecond, millisecond 
logdir1.4 2.32.42.5<dirpath>/tmp/- 
datadir1.4 2.32.42.5<dirpath>/home/user/maxscale_data/- 
libdir1.4 2.32.42.5<dirpath>/home/user/lib64/- 
cachedir1.4 2.32.42.5<dirpath>/tmp/maxscale_cache/- 
piddir1.4 2.32.42.5<dirpath>/tmp/maxscale_cache/- 
execdir1.4 2.32.42.5<dirpath>/usr/local/bin/- 
connector_plugindir  2.32.42.5<dirpath>/usr/lib/plugin/  
persistdir  2.32.42.5<dirpath>/var/lib/maxscale/maxscale.cnf.d/  
module_configdir  2.32.42.5<dirpath>/var/lib/maxscale/  
language1.4 2.32.42.5<dirpath>/home/user/lang/- 
query_classifier  2.32.42.5<classifier>qc_sqlite  
query_classifier_cache_size  2.32.42.5<n>15% of system Memorybyte 
query_classifier_args  2.32.42.5    
substitute_variables  2.32.42.5{ true | false }false  
sql_mode  2.32.42.5{ default | oracle }default  
local_address  2.32.42.5<IP address>*  
users_refresh_time  2.32.42.5<n>30second 
user_refresh_interval   2.42.5<n>0second 
retain_last_statements  2.32.42.5<n>0statement 
dump_last_statements  2.32.42.5{ on_error | on_close | never }never- 
session_trace  2.32.42.5<n>0statement 
writeq_high_water  2.32.42.5    
writeq_low_water  2.32.42.5    
load_persisted_configs  2.32.42.5{ 0 | 1 }1  
max_auth_errors_until_block   2.42.5<n>10  
debug    2.5    
admin_host  2.32.42.5<IP address>127.0.0.1  
admin_port  2.32.42.5<n>8989  
admin_auth  2.32.42.5 1  
admin_ssl_key  2.32.42.5    
admin_ssl_cert  2.32.42.5    
admin_ssl_ca_cert  2.32.42.5    
admin_enabled  2.32.42.5{ 0 | 1 }   
admin_gui    2.5 1  
admin_secure_gui    2.5    
admin_log_auth_failures   2.42.5{ 0 | 1 }1  
admin_pam_readwrite_service   2.42.5    
admin_pam_readonly_service   2.42.5    

Service Options

VariableVersionsValuesDefaultUnitComment
type1.4 2.32.42.5service - 
router1.4 2.32.42.5{ readconnroute | readwritesplit | schemarouter | binlogrouter } - 
router_option1.4 2.32.42.5{ slave | master,slave } - 
filters1.4 2.32.42.5{ counter | QLA } - 
targets    2.5{ server | service, ... }   
servers1.4 2.32.42.5{ <server1>, <server2>, ... } - 
cluster   2.42.5<name>   
user1.4 2.32.42.5{ <username> } - 
passwd1.4 2.32.42.5{ <password> } - 
enable_root_user1.4 2.32.42.5{ 0 | 1 }0- 
localhost_match_wildcard_host1.4 2.32.4 { 0 | 1 }0 Deprecated and ignored.
version_string1.4 2.32.42.5<string>5.5.5-10.0.0 MaxScale <MaxScale version>  
weightby1.4 2.32.4 <server_weight>  Deprecated in 2.3 and removed in 2.5, use rank instead
auth_all_servers1.4 2.32.42.5{ 0 | 1 }0  
strip_db_esc1.4 2.32.42.5{ 0 | 1 }0  
optimize_wildcard1.4  2.4 { 0 | 1 }0  
retry_on_failure1.4 2.3  { 0 | 1 }1 Ignored by 2.4 and removed in the future.
log_auth_warnings1.4 2.32.42.5{ 0 | 1 }0  
connection_timeout1.4 2.32.42.5<n> second 
max_connections  2.32.42.5<n> connection 
max_retry_interval 2.22.32.4 <n>3600second 
session_track_trx_state  2.32.42.5 false Only supported by MariaDB 10.3 and newer
retain_last_statements  2.32.42.5    
connection_keepalive    2.5<n>300  
net_write_timeout   2.42.5 0second 

Routing Modules

ReadConnRoute

For (weighted) load balancing.

SQL Query Tuning - Performance

Taxonomy upgrade extras: 

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

Creating synthetic data sets for tuning SQL queries

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.

Kernel Documentation

Taxonomy upgrade extras: 

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

MyISAM locking and who is the evil?

Taxonomy upgrade extras: 

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…

Good explanation for bond interfaces

Taxonomy upgrade extras: 

802.3ad bond interface have show high RX dropped packets

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

MariaDB and MySQL package holding or locking

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 upgrade untested software. To achieve this you want to keep/not upgrade some important packages. For example the MariaDB or MySQL server package.
This package pinning is called package version lock on CentOS and Redhat and package holding on Debian and Ubuntu.

MariaDB SQL Error Log Plugin

Taxonomy upgrade extras: 

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…

FromDual Ops Center File Transfer

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.

Centralized Crontab with FromDual Ops Center

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.

WMware snapshots or Veeam backups

Taxonomy upgrade extras: 

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

InnoDB full-text index corruption

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).

Increase file limit of a running process

Taxonomy upgrade extras: 

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

New Warning: P_S Metadata Lock instrumentation is disabled

Taxonomy upgrade extras: 

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

Remote Syslog Server

Taxonomy upgrade extras: 

FromDual Performance Monitor for MariaDB 1.2.0 has been released

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.

FromDual Performance Monitor for MySQL 1.2.0 has been released

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

Pages

Subscribe to RSS - Shinguz's blog