MySQL continues to be one of the most popular databases used in cloud-native applications. In fact, MySQL is so popular that other cloud databases such as AWS Aurora maintain wire protocol compatibility with MySQL. For SREs and DevOps engineers running MySQL database in production, it is crucial to understand how to monitor MySQL. MySQL poor health can lead to cascading effects on other application components. For example, slow queries can impact page load times for an application, or missing indexes can result in high-latency and application time-outs. By effectively monitoring the performance of databases and query executions, SREs and DevOps can identify if there are bottlenecks in the database tier which affect the overall application performance. With this appreciation for the importance of MySQL monitoring, let us quickly survey what techniques are commonly used for MySQL monitoring and then discuss …
[Read more]I’ve been a fan of GNU Parallel for a while but until recently have only used it occasionally. That’s a shame, because it’s often the simplest solution for quickly solving embarrassingly parallel problems.
My recent usage of it has centered around database export/import operations where I have a file that contains a list of primary keys and need to fetch the matching rows from some number of tables and do something with the data. The database servers are sufficiently powerful that I can run N copies of my script to get the job done far faster (where N is value like 10 or 20).
A typical usage might look like this:
cat ids.txt | parallel -j24 --max-lines=1000 --pipe "bin/munge-data.pl --db live >> {#}.out
However, I recently found myself scratching my head because parallel was only running 3 jobs rather than the 24 I had specified. …
[Read more]After MySQL version upgrade, there is a possibility that application will start getting error/exception for INSERT/UPDATE operation due missing default data/values as follows,
ERROR: Field ‘column_name’ doesn’t have a default value
Also above error will trigger for the wrong data type or out of range value for the column with INSERT/UPDATE sql operation.
Reason for this error is new SQL_MODE default values (MySQL 5.7 ) that included STRICT_TRANS_TABLES value in it and sql_mode value in default my.cnf created after installation[ Under /etc/my.cnf or /usr/my.cnf ]
sql_mode | MySQL version | Default |
<=5.6.5 | ” | |
>= 5.6.6 | … |
We recently released the presentations for ConFoo Montreal. This giant conference will be held on March 8-10, 2017.
It’s also the last chance to get tickets for ConFoo Vancouver, held on December 5-7, 2016.
ConFoo is a multi-technology conference aimed specifically at web developers. It has between 100 and more than 150 presentations by local and international speakers. This conference offers a great diversity in content to expand your knowledge and increase your productivity. It is the perfect place to sharpen those hard tech and start using these tools for your company skills and discover the latest practices .
There is a great range of …
[Read more]This blog discusses some important aspects of GCache.
Why do we need GCache?
Percona XtraDB Cluster is a multi-master topology, where a transaction executed on one node is replicated on another node(s) of the cluster. This transaction is then copied over from the group channel to Galera-Cache followed by apply action.
The cache can be discarded immediately once the transaction is applied, but retaining it can help promote a node as a DONOR node serving write-sets for a newly booted node.
So in short, GCache acts as a temporary storage for replicated transactions.
How is GCache managed?
Naturally, the first choice to cache these write-sets is to use memory allocated pool, which is governed by gcache.mem_store. However, this is deprecated and buggy and shouldn’t be used.
Next …
[Read more]We are glad to announce the release of the updated versions of:
This blog post reviews the appropriateness of Docker and other container solutions for your database environment.
A few weeks back, I wrote a fairly high-level blog post about containers. It covered what you should consider when thinking about using Docker, rkt, LXC, etc. I hope you’ve taken the chance to give it a quick read. It’s a good way to understand some of the disciplines you need to consider before moving to a new technology. However, it sparked a conversation in our Solutions Engineering team. Hopefully, the same one that you’re having in your organization: should customers run their database in containers? …
[Read more]Very often MySQL is much less stable than we realize. In this video I explain how to detect and dianose these MySQL stalls that last for 5-10 seconds or more.
The reason nobody knows about these issues is that they’re:
a) rare
b) intermittent
c) monitoring software can’t catch them
You can use pt-stalk to detect and diagnose such issues. All of the tools I have mentioned in this video are part of Percona Toolkit (no wonder they all start with PT), you can find the toolkit here:
Here’s the main commands I have discussed in this video:
Starting pt-stalk in foreground
# pt-stalk
Starting pt-stalk in background with email notification:
# pt-stalk …[Read more]
This release fixes a few issues in the new GUI transactions supporting with specific and uncommon server settings.
Changes as compared to SQLyog MySQL GUI 12.3.1 include:
Bug Fixes:
* If an INIT_CONNECT setting in server configuration specified
SET AUTOCOMMIT = 0 and global AUTOCOMMIT was 1 (or non-existent
as in MySQL 4.1 and 5.0), the ‘transactions’ menu in SQLyog would
incorrectly display AUTOCOMMIT as 1 after connection.
* Same code change as above also fixes a crash that could occur
with 4.1 servers.
* Transactions support would fail to initialize with servers
running global ANSI mode. SQLyog will not work in ANSI mode but
connection and initialization should work, so that user as the
first step may specify a supported session sql_mode (from the
editor or from ‘advanced’ tab in connection …
Join Percona’s Percona XtraDB Cluster Lead Software Engineer Krunal Bauskar for a webinar on Thursday, November 17, 2016, at 7:30 am PST on MySQL High Availability with Percona XtraDB Cluster 5.7.
Percona XtraDB Cluster 5.7 is our brand new MySQL 5.7 compatible Galera-based high availability (HA) solution. Whether you’re new to MySQL clustering technology, or experienced with Galera-based replication, this tutorial provides great insights into working with the software, …
[Read more]