FromDual TechFeed (en)
Replication in a star
Most of you know, that it is possible to synchronize MySQL and MariaDB servers using replication. But with the latest releases, it is also possible to use more than just two servers as a multi-master setup.
Most of you know that both MySQL and MariaDB support replication in a hierarchical master-slave-setup, to propagate changes across all connected servers.
But with the latest releases, a slave can have more than one master.
The keyword: Multi-Source replication
It is supported from MySQL 5.7 and MariaDB …
Taxonomy upgrade extras: Gtid Replication Multi-Source
binlog_rows_query_log_events
Hi oli
Since MySQL 5.6.2 there is a new MySQL variable called binlog_rows_query_log_events. If you enable this variable MySQL will write the original SQL statements into the binary logs. More information about this variable you can find here:
http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_rows_query_log_events
To see the original queries you can either run SHOW BINLOG EVENTS ... in the MySQL client or you can run mysqlbinlog -vv binary-log.000001
I hope, this …
Taxonomy upgrade extras:
MyEnv Installation Guide
This article covers the installation of MyEnv, the MySQL and MariaDB environment of FromDual.
To learn more about what MyEnv is go here.
Table of Contents
- MyEnv Requirements
- Preparations for MyEnv
- Download of MyEnv
- Installation of MyEnv
- Downloading and installing database binary tar-ball
- Configuration of MyEnv
- Put MyEnv under Systemd controll
- Put a database under MyEnv control
- How MyEnv works
- Functionality
- Upgrade MyEnv …
Taxonomy upgrade extras: Virtualization Consolidation Installation Operations Multi Instance Myenv
How to Get a Galera Cluster Into Split Brain
“Split Brain” is the term commonly used for a cluster whose nodes have different contents, rather than identical as they should have. Typically, a “split brain” situation is the DBA’s nightmare, and the Galera software is designed to avoid it. Galera is very successful in that avoidance, and it needs some special steps by the DBA to achieve “split brain”. Here is how to do it - or, for most DBAs, what to avoid doing to not get a split-brain cluster.
Galera’s …
Taxonomy upgrade extras:
Migration of SQLite to MySQL
In my first Blog ever, I am going to cover the migration of a SQLite-Database to MySQL. The Tool used is MySQL-Workbench, which you can Download from the MySQL website. In this particular case, it is about the upgrade of mocenter 0.2 to 0.3.

In the Workbench on the right side, you have the button “Database Migration”. Once you click on it, the introduction to the migration wizard will show up.
Setting up source and target
On the bottom of the screen there is a button called “Start Migration”. Click it to …
Taxonomy upgrade extras: Focmm Migration
Change: Port needed
With Galera version 25.3.10, the “garbd” daemon would not start unless I appended the port number (default: 4567) to the IP addresses of the cluster nodes.
The failure symptom was that an exception “gu::NotSet” was thrown, without any helpful information what it was really missing.
Taxonomy upgrade extras:
Max_used_connections per user/account
How many connections can be opened concurrently against my MySQL or MariaDB database can be configured and checked with the following command:
SHOW GLOBAL VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 505 |
+-----------------+-------+
If this limit was ever reached in the past can be checked with:
SHOW GLOBAL STATUS LIKE 'max_use%';
+----------------------+-------+
| Variable_name | Value | …Taxonomy upgrade extras: Max_used_connections User Account Connection Configuration
InnoDB plugin is enabled
InnoDB Log File size is too small
The InnoDB Log File (innodb_log_file_size) size is possibly too small.
Choosing a too small InnoDB Log File size can have significant write performance impacts.
For further details please consult MariaDB or MySQL documentation.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Transaction
InnoDB Foreign Key error detected
MySQL (InnoDB, PBXT, NDB, TokuDB) support Foreign Keys to show relatations between tables. Those relations can be enforced through Foreign Key Constraints.
Foreign Key Constraint Errors are always either a bug in your application (which should be fixed) or inconsistencies in your data (which should be fixed) or both (first fix the bug in the application, then clean-up your data).
Foreign Key Constraint Errors can be found with the following command:
SHOW ENGINE INNODB STATUS<br>G
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Foreign Key
InnoDB Force Recovery is enabled
InnoDB Force Recovery (innodb_force_recovery) is enabled. This mode should be used for data recovery purposes only. It prohibits writing to the data.
Please consult MariaDB and MySQL documentation for further details or InnoDB Recovery Modes.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Recovery
InnoDB Flush Log at Transaction Commit
InnoDB Flush Log at Transaction Commit is set to a values != 1. This can lead to a loss of committed transactions in case of a power failure or an unclean shutdown of your database.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Transaction Performance
InnoDB Deadlock detected
You got an InnoDB Deadlock. Please talk to your development department to fix this problem. Deadlocks are an application problem!
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Deadlock
InnoDB Buffer Pool Instances is too small
If you are using MariaDB/MySQL 5.5 and newer you should use several InnoDB Buffer Pool Instances for performance reasons.
Some rules to size InnoDB Buffer Pool instances are:
- One InnoDB Buffer Pool Instance should be at least 1 Gibyte in size (
innodb_buffer_pool_size/innodb_buffer_pool_instances
>= 1 Gib). - InnoDB Buffer Pool Instances you can set equal to the number of cores of your machine.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Innodb Buffer Pool Configuration Parameter Variables
Binlog format MIXED with filtering
Binlog format MIXED changes the binary log format (ROW or STATEMENT) depending on the queries (deterministic or not). This makes it impossible to define 100% correctly working binary log filter rules.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Binlog_format Filter Filtering Binary Log Replication Configuration Tuning Optimizing Variables
Flush time is set
If the variable flush_time is set to a non-zero value, all tables are closed (and flushed) every flush_time seconds to disk. This can cause unnecessary and high I/O spikes.
For further information consult MariaDB or MySQL documentation.
Taxonomy upgrade extras: Fpmmm Triggers and Rules Fpmmm Myisam Tuning Optimizing Configuration Variables
Table definition cache too small
The number of table definitions (SHOW CREATE TABLE<br>G) that can be stored in the table definition cache (table_definition_cache). If you have a large number of tables (
> 400) in your database instance, you should consider a larger table definition cache to increase your database throughput and decrease your query latency.
The command SELECT COUNT(*) FROM information_schema.tables; shows you how many tables and thus table definitions you have. The global status Open_table_definitions is the …
Taxonomy upgrade extras: Fpmmm Table_definition_cache Optimize Tuning Configuration Parameter Fpmmm Triggers and Rules Multi-Tenant
Table open cache too small
The Table Open Cache (table_open_cache or old name table_cache) is a cache to store file handles for all threads. The actual value of cache entries can be seen with the global status of open tables (Open_tables).
Increasing table_open_cache increases the number of file descriptors (open_files_limit) that MySQL requires.
You can check whether you need to increase the Table Open Cache by checking Open_tables and Opened_tables. If the value of Opened_tables is large and you do not use FLUSH TABLES often (which …
Taxonomy upgrade extras: Fpmmm Table_open_cache Open_files_limit Table_cache Tuning Optimizing Configuration Parameter Variables Fpmmm Triggers and Rules Multi-Tenant
Limitations of Galera Cluster
If and how to use Galera Cluster for MySQL has been described already by many others…
In this article we focus on the question: When is Galera Cluster NOT the right solution for you?
These thoughts also apply to Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster.
- Galera Cluster currently supports only InnoDB (and TokuDB?) tables properly. You should avoid to use
MyISAMorMEMORYtables. Otherwise data consistency is not guaranteed. - It is wise to use Galera Cluster only if your software vendor …
Taxonomy upgrade extras: Limitations Galera Cluster Limitation
Migration from other databases to MySQL or MariaDB
Database migration tools
A generic database migration tool to MySQL and MariaDB is the MySQL Workbench.
An alternative is the old MySQL Migration Tool Kit.
Recommended by MariaDB Foundation: Sqlines.
Adabas D to MariaDB migration
Project migrating an Adabas D database to MariaDB is in progress. More information are expected before end of 2015.
Oracle to MySQL or MariaDB migration
- MyOraDump is a tool to export data from an Oracle database to MySQL or MariaDB. …
Taxonomy upgrade extras: Mysql Mariadb Migration Oracle Sql Server Access Filemaker Db2 Sybase Postgresql Exasol Adabas D Utf8mb4

