Month: September 2017

Oracle OpenWorld 2017

For those of you that can make Oracle OpenWorld 2017, come along and meet me and the optimizer developers at demo booth 143 in Moscone West. We’ll be there on Monday, Tuesday and Wednesday.

The optimizer session is Get Some Sleep at Night: Use the Optimizer’s Plan Stability Features on Monday Oct 2nd, 5:45 p.m. – 6:30 p.m. in Moscone West, room 3004. There’s more to this session than meets the eye, so if you want to be the first to hear some important optimizer news then be sure to come along.

MySQL Enterprise Monitor 4.0.0 GA has been released

We are very happy to announce the general availability of MySQL Enterprise Monitor, Version 4.0. MySQL Enterprise Monitor is the best-in-class tool for monitoring and management of your MySQL assets and is included with your MySQL Enterprise Edition and MySQL Enterprise Carrier Grade subscriptions.

You can find more information on the contents of this release in the change log.

Highlights of MySQL Enterprise Monitor 4.0 include:

Modern look and feel: a redesigned user interface delivers a vastly improved overall user experience. The visible changes–the layout, the icons, the and the overall aesthetics–provide a more natural and intuitive experience. Views dynamically change and adjust to your current context and the assets you’ve selected, everything from individual MySQL instances or hosts to your custom Groups, to your complex replication and clustered topologies. Additional enhancements include a much more responsive UI and a greater capacity to scale, allowing you to more effectively manage thousands of MySQL related assets.
MySQL Cluster monitoring: we now auto-discover your MySQL Cluster installations and give you visibility into the performance, availability, and health of each MySQL instance and NDB process, as well as the health of the MySQL Cluster instance as a single logical system. The Overview dashboard displays detailed instrumentation available for each MySQL Cluster and the Topology dashboard displays the current configuration of your MySQL Cluster enabling you to quickly see the status of the MySQL Cluster instance as a whole and each individual process. The Topology dashboard allows you to easily see how your MySQL Cluster installations are currently functioning.
A User Statistics report: which provides an easy way to monitor MySQL resource utilization broken down by user.

You will find binaries for the new release on My Oracle Support. Choose the “Patches & Updates” tab, and then choose the “Product or Family (Advanced Search)” side tab in the “Patch Search” portlet.

You will also find the binaries on the Oracle Software Delivery Cloud soon.  Type “MySQL Enterprise Monitor 4.0.0” in the search box, or enter a license name to find Enterprise Monitor along with other MySQL products: “MySQL Enterprise Edition” or “MySQL Cluster Carrier Edition”.  Then select your platform.

Please open a bug or a ticket on My Oracle Support to report problems, request features, or give us general feedback about how this release meets your needs.

If you are not a MySQL Enterprise customer and want to try the Monitor and Query Analyzer using our 30-day free customer trial, go to, or contact Sales at

Thanks and Happy Monitoring!

– The MySQL Enterprise Tools Development Team

Useful URLs

What’s New in 4.0
Change log
Installation documentation
Complete documentation
Product information
Frequently Asked Questions

This Week in Data with Colin Charles 8: Percona Live Europe 2017 Is a Wrap!

Colin CharlesJoin Percona Chief Evangelist Colin Charles as he covers happenings, gives pointers and provides musings on the open source database community. Percona Live Europe 2017 Dublin We’ve spent a lot of time in the last few months organizing Percona Live Europe Dublin. I want to thank all the speakers, sponsors and attendees for helping us to […]

Percona Live Europe Session Interview: High-Performance JSON – PostgreSQL Vs. MongoDB with Wei Shan Ang and Dominic Dwyer (GlobalSign)

Percona Live Europe Wei DominicThe Percona Live Europe 2017 conference has been going strong for two days, and I’ve been to a bunch of presentations. An excellent one was High-Performance JSON – PostgreSQL Vs. MongoDB with Wei Shan Ang and Dominic Dwyer of GlobalSign. This talk was very engaging and well attended and provided some enlightening stats from their experiments […]

Percona Monitoring and Management 1.3.1 Is Now Available

Percona announces the release of Percona Monitoring and Management 1.3.1. This release only contains bug fixes related to usability.
For install and upgrade instructions, see Deploying Percona Monitoring and Management.

Bug fixes

PMM-1271: In QAN, when the user selected a database host with no queries, the query monitor could still show metrics.

PMM-1512: When clicking the QAN in Grafana, QAN would open the home page. Now, QAN opens and automatically selects the database host and time range active in Grafana.

PMM-1523: User-defined Prometheus memory settings were not honored, potentially causing performance issues in high load environments.

Other bug fixes in this release: PMM-1452, PMM-1515.

About Percona Monitoring and Management
Percona Monitoring and Management (PMM) is an open-source platform for managing and monitoring MySQL and MongoDB performance. Percona developed it in collaboration with experts in the field of managed database services, support and consulting.
PMM is a free and open-source solution that you can run in your own environment for maximum security and reliability. It provides thorough time-based analysis for MySQL and MongoDB servers to ensure that your data works as efficiently as possible.
A live demo of PMM is available at
We’re always happy to help! Please provide your feedback and questions on the PMM forum.

If you would like to report a bug or submit a feature request, please use the PMM project in JIRA.

How to set up and use MariaDB Connector C

I just wanted to provide quick tutorial on using MariaDB’s Connector C.
I downloaded the latest Connector C (3.0.2), running MariaDB 10.1.28, and was able to get it to work fine with a simple C program using the following commands:
1. Downloaded the Connector C .msi file (32-bit, since my VS is 32-bit), extracted, and installed, which placed it at:

C:\Program Files (x86)\MariaDB\MariaDB Connector C\lib

2. You need to add the directory that contains libmaria.dll to your $PATH Environment LIB PATH variable. In my case, it was:

Control Panel -> System -> Advanced System Settings -> Environment Variables -> Choose “LIB” from under “System variables” -> then add the Connector C lib path, like:

C:\Program Files (x86)\MariaDB\MariaDB Connector C\lib

3. Then just run the following command, where my c/c++ program name is “mysql1.c”:

cl /I “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include” /I “C:\Program Files (x86)\mariadb-10.1.25\include\mysql” /I “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include” /MD “C:\Program Files (x86)\MariaDB\MariaDB Connector C\lib\libmariadb.lib” mysql1.c

Note the first path is to include all normal C headers like stdio.h, the second for mysql.h, and the third is for windows.h, and the last for the Connector C .lib.
Here is the actual session output:

C:\chris\mysql1> cl /I “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include” /I “C:\Program Files (x86)\mariadb-10.1.25\include\mysql” /I “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include” /MD “C:\Program Files (x86)\MariaDB\MariaDB Connector C\lib\libmariadb.lib” mysql1.c

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80×86
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.


4. If all is successful, as the above, you can invoke your newly created c/c++ program, mysql1.exe, in this case (mine just obtains the version number from the instance):


MySQL Version = 100128

For reference, here is my mysql1.c code:


MYSQL *conn;
int version = 1;

int main ( int argc, char *argv[] )
conn = mysql_init ( NULL );
mysql_real_connect ( conn, “localhost”, “root”,
“xxxxx”, “test”, 3316, NULL, 0 );
version = mysql_get_server_version( conn );
printf(“\nMySQL Version = %d\n”,version);
mysql_close ( conn );
return 0;

Previous related posts, if interested:

Creating a basic C/C++ Program to Interact with MySQL and MariaDB
Common Errors and Resolutions for Building your own MySQL or MariaDB C/C++ Program on Windows
Setting Up Connector/C and SkySQL C Connector for MySQL and MariaDB

I hope this helps.

Watch the Replay: MySQL on Docker – Understanding the Basics

Thanks to everyone who joined us this week as we broadcast our MySQL on Docker webinar live from the Percona Live Conference in Dublin!

Our colleague Ashraf Sharif discussed how Docker containers work through to running a simple MySQL container as well as the ClusterControl Docker image (amongst other things)

If you missed the session or would like to watch it again, it’s now online for viewing.

Watch replay

Related resources

 MySQL on Docker – Blog Series

 Severalnines on Docker Hub

 ClusterControl Docker Image

Here’s the full agenda of the topics that were covered during the webinar. The content is aimed at MySQL users who are Docker beginners and who would like to understand the basics of running a MySQL container on Docker.

Docker and its components
Concept and terminology
How a Docker container works
Advantages and disadvantages
Stateless vs stateful
Docker images for MySQL
Running a simple MySQL container
The ClusterControl Docker image
Severalnines on Docker Hub

Watch replay

And if you’re not following our Docker blog series yet, we encourage you to do so: MySQL on Docker.


mysql on docker
mysql containers

Handling Encrypted InnoDB Tablespace Backups

      ​In this post, we are going to see how we can backup encrypted tables using Xtrabackup. InnoDB supports data encryption for InnoDB tables stored in file per table tablespaces. For the application to access encrypted tablespace, InnoDB will use master encryption key to decrypt the tablespace key. The master encryption key is stored in a keyring file in the location specified by the key_ring_file_data configuration option. We have already discussed on enabling encrypted tablespace. Here, we will try full and incremental backups of encrypted tablespace.
Percona xtrabackup supports encrypted innodb tablespace backups. While taking backup, we have to add –keyring-file-data and –server-id. After the completion of the backup, we have to use the same options to prepare the backup. Below is an example of encrypted table,

Backup can be taken without using –keyring-file-data and –server-id and the same can be done for apply log as well. But, after restoring the backup we cant access the encrypted table. It will throw error like below,

So, proper encrypted backup should be taken by specifying the path to keyring file and server-id. 
innobackupex –user=root –password=pass –safe-slave-backup  –keyring-file-data=/var/lib/mysql_keyring/keyring –server-id=176457 /path/to/backup
Once the backup is completed, we have prepare the backup by passing the same options. Its needed to specify keyring file data but not server id  as it can be obtained from backup-my.cnf. Xtrabackup will not copy keyring file into the backup directory. In order to prepare the backup, you must make a copy of keyring file yourself.
innobackupex –apply-log –use-memory=20G –keyring-file data=/var/lib/mysql_keyring/keyring  /path/to/backup
After finishing applying the logs, you should can see the below message,
InnoDB: Shutdown completed; log sequence number 21647652170528 19:23:15 completed OK!
Once the backup is prepared, it can be restored either using –move-back or –copy-back. If the keyring file is rotated during the backup, we have to use the same keyring file which was used to backup and prepare backup. After successful restoration, we can see the data.

If the master key file is deleted or moved, then the encrypted table cant be accessed. So, it must be stored properly.
To perform incremental backup, we need a full backup. The Xtrabackup binary writes a file called xtrabackup_checkpoints  in the backup directory.

After the full backup, the incremental backup will be based on that.Even here the xtrabackup will not copy keyring file into the backup directory. In order to be prepare the backup, you must make a copy of keyring file yourself. If the keyring hasn’t been rotated you can use the same as the one you’ve backed-up with the base backup. If the keyring has been rotated you’ll need to back it up otherwise you won’t be able to prepare the backup.
innobackupex–user=root –password=pass –incremental –incremental-basedir=/path/to/base/backup/  –keyring-file-data=/var/lib/mysql_keyring/keyring –server-id=176457 /path/to/inc/backup
Now the incremental backup directory will have the delta files, which represents the changes.
The apply log phase in incremental backup doesn’t work like full backup. Here, you must use –apply-log-only to rollback phase. Then we have to prepare the base and incremental backup.
innobackupex –user=root –password=pass –apply-log-only –use-memory=10G –keyring-file-data=/var/lib/mysql_keyring/keyring/  /path/to/base/backup/
After preparing the base backup, the incremental backup should applied from the base backup.
 innobackupex–user=root –password=pass –apply-log-only –incremental-dir=/path/to/inc/backup –keyring-file-data=/var/lib/mysql_keyring/keyring/  /path/to/base/backup/
Once it is successful, it can be restored. If there is any issue in accessing the encrypted tables, then either the file should have rotated or it might have removed/moved. So, it us necessary to check the encrypted tables after the restoration.

TEL/電話+86 13764045638
QQ 47079569