Hot answers tagged

13 votes
Accepted

How to restart MariaDB Galera cluster?

MariaDB Galera Cluster: Solution 1: 1) I've changed safe_to_bootstrap parameter to 1 on one of the node in the file /var/lib/mysql/grastate.dat: safe_to_bootstrap: 1 2) After that I killed all mysql ...
user avatar
  • 343
10 votes
Accepted

InnoDB: Error: Table “mysql”.“innodb_table_stats” not found

The problem is actually very simple. Here is what happened When you installed MySQL, the 5 InnoDB systems tables exist in two places inside /var/lib/mysql/mysql as 5 .frm and 5 .ibd files inside the ...
user avatar
6 votes
Accepted

Why does most Galera cluster documentation recommend having at least 3 nodes as the typical set up?

If you want real HA ("High Availability"), you need 3 nodes in 3 separate locations. When one machine goes down, the rest of the nodes vote and see that they are in the majority. They see 2 out of 3,...
user avatar
  • 68.7k
6 votes
Accepted

MariaDB 10.1.16 on Ubuntu fails to start: WSREP Failed to recover position

There was a bug in galera_recovery.sh script. https://jira.mariadb.org/browse/MDEV-10396
user avatar
6 votes
Accepted

How to recover MariaDB Galera Cluster after full crash?

Pre-Recovery Settings: Ensure that the MYSQL_HOME path is being exported in the .profile. If the MySQL install is in a different location, then make that change to the MYSQL_HOME.(Example: MYSQL_HOME=...
user avatar
6 votes

Galera cluster into Google cloud platform

but I have difficulties to see the added value compared to Cloud SQL instances with replication and backup. I am not very familiar in scaling heavy load systems. Galera-based clusters like ...
user avatar
5 votes

Using Galera for simple master-master replication

1) Is a two node configuration safe\supported? Galera will still run in a two node setup. However, there is always the threat of a split-brain scenario. For example, suppose you have DB1 and DB2 form ...
user avatar
5 votes
Accepted

ERROR WSREP`: gcs/src/gcs.cpp:gcs_open():1379:` Failed to open channel 'test_cluster'

We should start the first node without below parameter in my.cnf : wsrep_cluster_address="gcomm://192.168.120.107,192.168.120.111,192.168.120.117" Then start the other nodes normally : /etc/init....
user avatar
  • 289
5 votes
Accepted

How to verify galera is synced

If wsrep_local_state_comment, wsrep_ready, and wsrep_connected show the correct values, then that particular node is good. There's no Seconds_Behind_Master equivalent, because Galera is synchronous ...
user avatar
5 votes
Accepted

'kill <query id>' gives ERROR 1095 (HY000): You are not owner of thread ... even though I am

The error message is misleading. Galera can mark user threads as high priority which means they can't be killed. Currently, this gives the ERROR 1095 (HY000): You are not owner of thread... See MDEV-...
user avatar
  • 5,766
4 votes
Accepted

Does it make sense to run a cluster of database servers in docker containers?

Galera (for MySQL, Percona XtraDB Cluster or MariaDB Cluster, they are essentially the same but from different vendors and base mysql version) can work perfectly with 2 machines, and it is a very ...
user avatar
  • 14k
4 votes

ERROR WSREP`: gcs/src/gcs.cpp:gcs_open():1379:` Failed to open channel 'test_cluster'

Please bootstrap the first node with below option service mysql start --wsrep-new-cluster Make sure you have the settings below in all config files: wsrep_cluster_address="gcomm://192.168.120.107,...
user avatar
4 votes
Accepted

Stop INNODB MONITOR OUTPUT

The variable you're looking for is innodb_status_output. Setting it to OFF should stop the innodb status from being dumped into the error log.
user avatar
  • 690
3 votes
Accepted

MySQL 5.5 Replication to Galera/Percona XtraDB Cluster

Yes, it is very possible. As the Documentation says, you should have a minimum of three nodes in a Percona XtraDB Cluster. You only need one node out of the three nodes. Make sure all nodes in the ...
user avatar
3 votes
Accepted

Upgrading MariaDB Galera cluster from 5.5 to 10.0 - rolling upgrade possible?

I have been asking the same question for several months and have also been unable to find a clear answer on the internet. Perhaps that means that I'm more concerned than I should be; perhaps I should ...
user avatar
3 votes

What are the drawbacks of using Galera Cluster instead of Master/Slave Replication?

Some drawbacks of Galera include: Storage engine support: limited to InnoDB/XtraDB (plus experimental support for MyISAM) OS support: only Linux/Unix-like Oses There are also some limitations which ...
user avatar
  • 5,766
3 votes
Accepted

grastate.dat with seqno -1 on a healthy cluster. Why?

A grastate.dat with a sequence number of -1 is fine on a running node. When the cluster stops cleanly, the sequence number will be set to a value on each node. You'll then have to bootstrap the ...
user avatar
  • 1,215
3 votes

MariaDB Galera Cluster without HAProxy, MYSQL Proxy, etc

You should use some kind of load-balancing solution, at least for these main reasons: To equally balance the load between the nodes. To check availability of the nodes and make it transparent as ...
user avatar
3 votes
Accepted

Replicate only some tables of MariaDB database

In order of your topics: You can't do that with cluster replication. Multi-master is a cluster feature. You should try to use the replicate_wild_do_table setting. Slave threads will be restricted ...
user avatar
  • 294
3 votes

How to get number of active users with one SQL-Query?

I don't know how to translate your tables into any of n_active_users; n_users_created_classified; n_user_sent_msg; n_user_read_msg. But here are some clues: A simple query for the immediately ...
user avatar
  • 68.7k
3 votes

The right way of starting up a Galera Cluster

At MariaDB 10.1 where Galera included you need to start first node with key --wsrep-new-cluster e.g. /etc/init.d/mysql start --wsrep-new-cluster All other nodes starts as usually: /etc/init.d/mysql ...
user avatar
3 votes

Is Galera Arbitrator really required?

If you have minimum of three active nodes in your cluster, you don't need to add garbd. You should use a garbd with the following conditions: When you have an even number of nodes and you can't add ...
user avatar
  • 597
3 votes
Accepted

Is it safe to disable sync_binlogs, innodb_flush_log_at_trx_commit and innodb_doublewrite on a site-redundant galera cluster?

I've done some research on this now, so I'll answer on my own question. Summary first If the performance problems are observed only on one node, it's perfectly safe to turn off innodb_doublewrite ...
user avatar
  • 201
3 votes
Accepted

100x less insert performance with Galera multi-master

I've hit the same issue. The first thing to do is to check the following variables: select @@innodb_flush_log_at_trx_commit; select @@sync_binlog; Setting innodb_flush_log_at_trx_commit to 2 and ...
user avatar
3 votes
Accepted

Percona - Unable to start mysql after restart

Yes Rick is right. Because all of nodes are down you have to bootstrap Cluster again. You stopped all nodes gracefully. If you know What is the last one (node) stopped, choice this node too ...
user avatar
  • 597
3 votes
Accepted

Galera SST fails

wsrep_sst_donor=2.2.2.2 wsrep_sst_donor should have the node name, not the IP address. A similar case was reported in the MariaDB Jira as MDEV-13687.
user avatar
  • 5,766
3 votes
Accepted

Galera not working with Replication

Your node2 needs to have log-slave-updates=1. See also SeveralNines' article on the topic which states: log-slaves-updates=1 is necessary for the writes to propagate from the slave to the other ...
user avatar
  • 5,766
3 votes
Accepted

MySQL Galera Cluster mass update delay

Galera replication is not synchronous, only what they call 'virtually synchronous'. It's synchronous only up to the point where the write set is to be applied. There might be a small period of time ...
user avatar
  • 5,766
3 votes
Accepted

MySQL XtraDB/Galera Cluster High Availability RamDisk *SuperFast*

OK, 3 Galera nodes, with: Each having all disk stuff sitting in RAM disks. Enough RAM to make that possible. The nodes separated geographically so that a volcano, flood, etc, cannot take out all of ...
user avatar
  • 68.7k
3 votes
Accepted

MySQL PXC node failing to receive state

First of all, thanks for providing enough debug information, not everybody does that. Your SST (data copy) is failing. Apparently, netcat is failing with "no route to host" error- that tells you that ...
user avatar
  • 14k

Only top scored, non community-wiki answers of a minimum length are eligible