When you are building Database Infrastructure for an data sensitive business (like financial services, digital commerce, advertising media solutions, healthcare etc. ) governed by compliance and policies, You are expected to maintain the audit log of the transactions to investigate, if you ever suspect something unacceptable (i.e., user updating / deleting data) happening to your database . MariaDB provides Audit Plugin (MariaDB started including by default the Audit Plugin from versions 10.0.10 and 5.5.37, and it can be installed in any version from MariaDB 5.5.20.) to log the server activity, Although the MariaDB Audit Plugin has some unique features available only for MariaDB, it can be used also with MySQL. MariaDB Audit Plugin log the details like who connected to server (i.e., username and host), what queries were executed, the tables accessed and server variables changed. This information is retained in a rotating log file or sent to …
[Read more]After having explained how to achieve HA for MySQL Router for people who doesn’t want to install the MySQL Router on the application servers and after having illustrated how to use Pacemaker, this article explains how to setup HA for MySQL Router using keepalived.
Keepalived is very popular, maybe because it’s also very easy to use. We can of course use 2 or more servers. The principle is the same as on the previous articles, if the router dies, the virtual IP used by the application server(s) to connect to MySQL is sent to another machine where mysqlrouter is still running.
Let’s have a look at the configuration, in this case we use 2 machines, mysql1 and …
[Read more]This article will explain how to setup HA for MySQL Router as described in a previous article about where should the router stand.
For this setup, I will use Pacemaker (part of RedHat High Availability Add-on and available on RHEL, CentOS, Oracle Linux, …).
Of course we need a MySQL InnoDB Cluster but we won’t really use it for the HA setup of the MySQL Router.
Installing Pacemaker
The first step is to install pacemaker on all the machines we will use for our “MySQL Router Cluster”:
# yum install pacemaker pcs resource-agents
Now we need to start the pcsd
service and enable it
at boot (on all machines):
# systemctl start pcsd.service # systemctl enable pcsd.service
It’s time now to setup authentication, this operation is again …
[Read more]As you know, MySQL InnoDB Cluster is composed of 3 elements:
- a group replication cluster of at least 3 servers
- the MySQL Shell used to manage the cluster
- the MySQL Router that send the traffic from the application server(s) to the cluster
When presenting the solution in conferences, one the main question is Where should I put the router ? and the answer is always the same: the best place to install the router is the application server !
The router is a very lightweight process that gets its configuration from the cluster’s metadata and doesn’t require a lot of resources or maintenance.
So the ideal setup is the following:
However for many (obscure?) reasons, sometimes people doesn’t want to have the MySQL …
[Read more]create table csv_date (date varchar(20)); insert into csv_date values ('2030-05-18 14:57:19'); insert into csv_date values ('2030-05-18 14:55:15'); insert into csv_date values ('2019-05-18 04:15:15'); insert into csv_date values ('2018-05-18 02:11:53'); insert into csv_date values ('2017-05-18 22:14:24'); Convert two digit to four digit in MySQL: Create a temporary table same as the original table but make the column …
The post How To Convert MySQL Two Digit Year To Four Digit Year appeared first on SQLgossip.
Welcome to the third part of this series. I’m glad you’re still reading, as hopefully this means you find this subject interesting at least. Previously we presented the first two components of MySQL InnoDB Cluster: Group Replication and MySQL Router and now we will discuss the last component, MySQL Shell.
MySQL Shell
This is the last component in the cluster and I love it. Oracle have created this tool to centralize cluster management, providing a friendly, command-line based user interface.
The tool can be defined as an advanced MySQL shell, which is much more powerful than the well known MySQL client. With the capacity to work …
[Read more]In this blog post, we talk about the basic function and features of the Tungsten Connector.
The Tungsten Connector is an intelligent MySQL proxy that provides key high-availability and read-scaling features. This includes the ability to route MySQL queries by inspecting them in-flight.
The most important function of the Connector is failover handling. When the cluster detects a failed master because the MySQL server port is no longer reachable, the Connectors are signaled and traffic is re-routed to the newly-elected Master node.
Next is the ability to route MySQL queries based on various factors. In the default Bridge mode, traffic is routed at the TCP layer, and read-only queries must be directed to a different port (normally 3306 for writes and 3307 for reads).
There are additional modes, Proxy/Direct and …
[Read more]Introduction
What is the X-DevApi? From insidemysql.com there is a definition of the X-DevAPI and its features in the following paragraphs:
The X DevAPI is the common client-side API used by all connectors to abstract the details of the X Protocol. It specifies the common set of CRUD-style functions/methods used by all the official connectors to work with both document store collections and relational tables, a common expression language to establish query properties such as criteria, projections, aliases, and a standard set of additional database management features for handling things like transactions, indexes, etc.
The fact that most of these features share the same format and API between connectors, makes the X DevAPI a perfect fit for modern polyglot development environments such as microservices, and the fact that they are based on a …
[Read more]Please join Percona’s Chief Evangelist, Colin Charles as he presents as he presents MariaDB 10.3 vs. MySQL 8.0 on Wednesday, July 18th, 2018, at 9:00 AM PDT (UTC-7) / 12:00 PM EDT (UTC-4).
Technical considerations
Are they syntactically similar? Where do these two databases differ? Why would I use one over the other?
MariaDB 10.3 is on the path of gradually diverging from MySQL 8.0. One obvious example is the internal data dictionary currently under development for MySQL 8.0. This is a major change to the way metadata is stored and used within the server, and MariaDB doesn’t have an equivalent feature. Implementing this feature could mark the end of datafile-level compatibility between …
[Read more]If you’re reading consumer SSD reviews and using them to estimate SSD performance under database workloads, you’d better stop. Databases are not your typical consumer applications and they do not use IO in the same way.
Let’s look, for example, at this excellent AnandTech review of Samsung 960 Pro – a consumer NVMe device that I happen to have in my test lab.
The summary table is actually great, showing the performance both at Queue Depth 1 (single threaded) as well as Queue Depth 32 – a pretty heavy concurrent load.
Even at QD1 we see 50K (4K) writes per second, which should be enough for pretty serious database workloads.
In reality, though, you might be in for some disappointing surprises. While “normal” buffered IO is indeed quite fast, this drive really hates fsync() calls, with a single thread …
[Read more]