I have been playing with MySQL Cluster for some years now, and
today I'd like to start writing a bit about it, how to set it up,
configure, backup and also how to use it, as there's plenty of
ways to drive operations towards the Cluster for brutal
speed and concurrency. MySQL Cluster, the open source in
memory database from Oracle MySQL, is available for free from
MySQL Cluster download page (Community version has
GPL license).
But before starting with an overview of installation and setup,
if you're new to MySQL Cluster, I would strongly recommend to
have a look at this video.
What I find more interesting about MySQL Cluster, is that it is
possible to have a setup running on commodity hardware (the bare
laptop), as it can be configured to have a minimum footprint in
terms of memory and storage requirements. About high
availability, …
I have been playing with MySQL Cluster for some years now, and today I’d like to start writing a bit about it, how to set it up, configure, backup and also how to use it, as there’s plenty of ways to drive operations towards the Cluster for brutal speed and concurrency. MySQL Cluster, the open source in memory database from Oracle MySQL, is available for free from MySQL Cluster download page (Community version has GPL license).
But before starting with an overview of installation and setup, if you’re new to MySQL Cluster, I would strongly recommend to have a look at this video.
What I find more interesting about MySQL Cluster, is that it is possible to have a setup running on commodity hardware (the bare laptop), as it can be configured to have a minimum footprint in terms of memory and storage requirements. About high availability, MySQL Cluster …
[Read more]Galera Cluster enforces strong data consistency, where all nodes in the cluster are tightly coupled. Although network segmentation is supported, replication performance is still bound by two factors:
- Round trip time (RTT) to the farthest node in the cluster from the originator node.
- The size of a writeset to be transferred and certified for conflict on the receiver node.
While there are ways to boost the performance of Galera, it is not possible to work around these 2 limiting factors.
Luckily, Galera Cluster was built on top of MySQL, which also comes with its built-in replication feature (duh!). Both Galera replication and MySQL replication exist in the same server software independently. We can make use of these technologies to work together, where all replication within a …
[Read more]
JSON_TABLE is one of the more complex functions that arrived in
MySQL 8. It takes schemaless JSON data and turns it into a
relational table. So your NoSQL data becomes SQL data and you can
use good ol' SQL where clauses on that temporary relational
table!
I stated writing about JSON_TABLE here and here last December. And you can find
details on using JSON_TABLE in my book. The following examples cover what
to do when key/value pairs are missing or bad, traversing nested
paths, and adding an ordinal number to nested values. These
operations …
Please join Percona Senior MySQL DBA for Managed Services, Dov Endress, as he presents XA Transactions on Wednesday, July 25th, 2018 at 12:00 PM PDT (UTC-7) / 3:00 PM EDT (UTC-4).
Distributed transactions (XA) are becoming more and more vital as applications evolve. In this webinar, we will learn what distributed transactions are and how MySQL implements the XA specification. We will learn the investigatory and debugging techniques necessary to ensure high availability and data consistency across disparate environments.
This webinar is not intended to be an in-depth look at transaction managers, but focuses on resource managers only. It is primarily intended for database administrators and site reliability engineers.
…
[Read more]In this blog post, we talk about how existing client connections are handled by the Tungsten Connector when a manual master role switch is invoked and how to adjust that behavior.
When a graceful switch is invoked via cctrl or the Tungsten Dashboard, by default the Connector will wait for five (5) seconds to allow in-flight activities to complete before forcibly disconnecting all active connections from the application side, no matter what type of query was in use.
If connections still exist after the timeout interval, they are forcibly closed, and the application will get back an error.
This configuration setting ONLY applies to a manual switch. During a failover caused by loss of MySQL availability, there is no wait and all connections are force-closed immediately.
This timeout is adjusted via the tpm option …
[Read more]In this blog post, I’ll walk you through setting up encrypted replication on MySQL 5.7 with GTID enabled. I will walk you through how to create sample certificates and keys, and then configure MySQL to only use replication via an encrypted SSL tunnel.
For simplicity, the credentials and certificates I used in this tutorial are very basic. I would suggest, of course, you use stronger passwords and accounts.
Let’s get started.
Create a folder where you will keep the certificates and keys
mkdir /etc/newcerts/ cd /etc/newcerts/
Create CA certificate
[root@po-mysql2 newcerts]# openssl genrsa 2048 > ca-key.pem Generating RSA private key, 2048 bit long modulus .............+++ ..................+++ e is 65537 (0x10001)
[root@po-mysql2 newcerts]# openssl req -new -x509 -nodes -days 3600 -key ca-key.pem -out ca.pem You are about to be asked to enter …[Read more]
JSON (JavaScript Object Notation) is a popular way for moving data between various systems, including databases. Starting with 5.7 MySQL implemented a native JSON data type and a set of JSON functions that allows you to perform operations on JSON values.
Glad you found it out!
LikeLike
Handling MySQL errors in Go is not easy. There are a lot of MySQL server error codes, and the Go MySQL driver as its own errors, and Go database/sql has its own errors, and errors can bubble up from other packages, like net.OpError. Consequently, Go programs tend not to handle errors. Instead, they simply report errors: err := db.Query(...).Scan(&v) if err != nil { return err } And then the error is logged or reported somewhere.