FromDual TechFeed (en)

Replication in a star

Oli Sennhauser - Thu, 2016-01-21 21:24

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

Shinguz - Tue, 2015-11-03 20:16

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

Oli Sennhauser - Tue, 2015-10-27 11:23

How to Get a Galera Cluster Into Split Brain

Oli Sennhauser - Fri, 2015-10-23 17:02

“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

Oli Sennhauser - Mon, 2015-10-19 09:38

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

Oli Sennhauser - Wed, 2015-08-05 16:42

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

Shinguz - Thu, 2015-07-30 23:34

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

Shinguz - Thu, 2015-07-16 20:16

InnoDB plugin is enabled.


Taxonomy upgrade extras:  Fpmmm Triggers and Rules  Innodb  Plugin 

InnoDB Log File size is too small

Shinguz - Thu, 2015-07-16 20:15

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

Shinguz - Thu, 2015-07-16 20:14

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

SHOW ENGINE Syntax …


Taxonomy upgrade extras:  Fpmmm Triggers and Rules  Innodb  Foreign Key 

InnoDB Force Recovery is enabled

Shinguz - Thu, 2015-07-16 20:12

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

Shinguz - Thu, 2015-07-16 20:11

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

Shinguz - Thu, 2015-07-16 20:10

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

Shinguz - Thu, 2015-07-16 20:09

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

Shinguz - Wed, 2015-07-15 06:11

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

Shinguz - Wed, 2015-07-15 06:10

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

Shinguz - Wed, 2015-07-15 06:08

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

Shinguz - Wed, 2015-07-15 06:04

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

Shinguz - Sat, 2015-07-11 17:07

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 MyISAM or MEMORY tables. 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

Shinguz - Fri, 2015-07-03 08:32

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

Data Migration Tools

  • 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 

Pages

Subscribe to FromDual aggregator - FromDual TechFeed (en)