Dear MySQL users,
MySQL Shell 8.0.17 is a maintenance release of MySQL Shell 8.0
Series (a
component of the MySQL Server). The MySQL Shell is provided
under
Oracle’s dual-license.
MySQL Shell 8.0 is highly recommended for use with MySQL Server
8.0 and
5.7. Please upgrade to MySQL Shell 8.0.17.
MySQL Shell is an interactive JavaScript, Python and SQL
console
interface, supporting development and administration for the
MySQL
Server. It provides APIs implemented in JavaScript and Python
that
enable you to work with MySQL InnoDB cluster and use MySQL as a
document
store.
The AdminAPI enables you to work with MySQL InnoDB cluster,
providing an
integrated solution for high availability and scalability using
InnoDB
based MySQL databases, without requiring advanced MySQL
expertise. For
more information about how to …
I was recently faced with a real issue about completely exhausting the disk space on MySQL. This was a serious issue because of the continuous outages of the service, as the customer had to constantly restart the server and wait for the next outage.
What was happening? In this article, I’m going to explain it and propose solutions.
Implicit temporary tables
MySQL needs to create implicit temporary tables for solving some kinds of queries. The queries that require a sorting stage most of the time need to rely on a temporary table. For example, when you use GROUP BY, ORDER BY or DISTINCT. Such queries are executed in two stages: the first is to gather the data and put them into a temporary table, the second is to execute the sorting on the temporary table.
A temporary table is also needed in case of some UNION statements evaluation, for …
[Read more]We are glad to announce the 1.1.0 release of the Percona Kubernetes Operator for Percona XtraDB Cluster.
The Percona Kubernetes Operator for Percona XtraDB Cluster automates the lifecycle and provides a consistent Percona XtraDB Cluster instance. The Operator can be used to create a Percona XtraDB Cluster, or scale an existing Cluster, and contains the necessary Kubernetes settings.
The Operator simplifies the deployment and management of the Percona XtraDB Cluster in Kubernetes-based environments. It extends the Kubernetes API with a new custom resource for deploying, configuring and managing the application through the whole life cycle.
The Operator source code is available …
[Read more]Overview The Skinny
Tungsten Clustering provides high availability, disaster recovery, and a host of other benefits for MySQL / MariaDB / Percona Server databases. In this blog post we will explore some of the shell aliases I use every day to administer various Tungsten Clusters.
Shell Aliases: A Quick Review Quick and Easy
A shell alias is simply a way to create a shortcut for frequently-used command sequences.
For example, I like to shorten the command clear to
cls, i.e.
shell> alias cls=clear shell> cls
If you create an alias on the fly it will be lost when the shell exits.
To save aliases so they are available to all shell sessions, update your shell’s profile or rc script.
For example, add the below line to the bottom of …
[Read more]Recently I had a customer where every single query was running in a transaction, as well as even the simplest selects. Unfortunately, this is not unique and many connectors like Java love to do that.
In their case, the Java connector changed
autocommit=off for the connection itself at the
beginning, and as these were permanent connections they never or
almost never reconnected.
In the slow query log we could see after every select there was a commit. So why is this a problem?
Test Case
Like always, the best way to deal with a problem to test it. I have created two EC2 instances t3.xlarge with Ubuntu, one for application and one for the databases. I have used sysbench to run my tests.
I have created a table with 1 million records and was running simple primary key point selects against the database. I was using …
[Read more]SQL Views Example | Views In SQL Tutorial is today’s topic. SQL views is a kind of virtual tables which have rows and columns as they are in a real database. A view can be accompanied with all the rows of a particular table or selected rows based on a certain condition. In Structured Query Language, a view is a virtual table based on the result-set of an SQL statement.
SQL VIEWS
SQL view contains rows and columns, just like the real table. The fields in the view are fields from one or more real tables in the database. You can add the SQL functions, WHERE, and JOIN statements …
[Read more]
SLEEP thread causing "Waiting for table metadata lock"
We might have faced some
scenarios once our db connection threads are getting locked and
we try to find the culprit thread id which is locking the thread,
to kill and release the connections.
Here I am going to focus on one of the scenarios when db
connection threads are locked at state "waiting for table
metadata lock" and when we see the processlist, we can't find any
thread which is running and using the same table, i.e., all
threads are in SLEEP state except the locked threads.
Such as :
mysql [localhost:5726] {msandbox} (world) > show …
MySQL How do you restore tablespace?
This is not new information but I have not covered it much so
addressing it now for those that need it.
If you lose your ibd files... you lose your data. So if you have
a copy of one available.. or even if you are syncing from another
database you can still import it. What/how do you lose
tablespace?
Here is a simple example to recover tablespace.
mysql> Create database demo;
mysql> use demo;
mysql> CREATE TABLE `demotable` (
-> `id` int(11) NOT NULL
AUTO_INCREMENT,
-> `dts` timestamp NOT NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-> PRIMARY KEY (`id`)
-> ) ENGINE=InnoDB;
Now we store some data...
…
What is new with MySQL 8.0 Delayed Replication ?
Delayed Replication – You can deliberately execute transactions later than the master by a specific duration of time , Why you do that and for what ? Consider this, Accidentally someone did a wrong UPDATE / DELETE in the master and the transaction is committed, Now how can DBA rollback the database system to the last known good condition ? This is when we benefit from MySQL delayed slave replication investment. The default replication delay in MySQL is “0” seconds, To delay the slave by N seconds use the CHANGE MASTER TO MASTER_DELAY = N, The transactions received from the master is not executed until N seconds later than it’s commit on the immediate master. We have blogged here how to setup …
[Read more]Percona is glad to announce the release of Percona XtraBackup 2.4.15 on July 10, 2019. You can download it from our download site and apt and yum repositories.
Percona XtraBackup enables MySQL backups without blocking user queries, making it ideal for companies with large data sets and mission-critical applications that cannot tolerate long periods of downtime. Offered free as an open source solution, it …
[Read more]