When you think about IOPS, you probably think about writes because MySQL write I/O has a long tradition of optimization, benchmarking, new algorithms, new storage engines, and so forth. There’s no shortage of material on MySQL write I/O; just two examples from Percona are Scaling IO-Bound Workloads for MySQL in the Cloud and Tuning MySQL/InnoDB Flushing for a Write-Intensive Workload. But in this short blog post I highlight two other, less common aspects of MySQL I/O: reads and surprises.
Taking a MySQL backup using Percona XtraBackup (PXB) consists of basically two steps: 1) take the backup and 2) prepare the backup.
Briefly speaking, taking a backup means that PXB will copy all of the files from your instance and transfer them to another location. While it does the copy, it spawns a thread that will monitor the InnoDB redo log (WAL/transaction log) and store a copy of all the new redo log entries generated by the server during the backup.
Before restoring the backup into a new instance, users have to prepare the backup. This operation is the same as the crash recovery steps that the MySQL server does after a server crash.
It consists of reading all the redo log entries into memory, categorizing them by space id and page id, reading the relevant pages into memory, and checking the LSN number on the page and on …
[Read more]What is dual password in MYSQL and how it works was already covered by my colleague Brian Sumpter here (https://www.percona.com/blog/using-mysql-8-dual-passwords/).
However let me do a brief recap here about it.
Dual password is the MySQL mechanism that allows you to keep two passwords active at the same time. This feature is part of a more extended set of Password management features implemented in MySQL 8 to enforce better security and secrets management, like:
- Internal Versus External Credentials Storage
- Password Expiration Policy
- Password Reuse Policy
- Password Verification-Required Policy
- Dual Password Support
- Random Password Generation
- Failed-Login Tracking and Temporary Account Locking
The most important and requested features …
[Read more]Having a backup of your database is like insurance, you have to pay a monthly price to ensure you have a service available when you need to. When talking about backups, the storage required to keep your backups is what comes into factor when talking about price, the bigger your backup, or the bigger the retention period, the more it will cost.
Compressing your backups is a common practice to reduce this cost. Currently, Percona XtraBackup (PXB) has support for two compression algorithms: quicklz (which is an abandoned project and will soon be deprecated in PXB) and LZ4.
Today we are glad to introduce support for a new compression algorithm in Percona XtraBackup 8.0.30 – …
[Read more]A quick primer on Perl programs connecting to the MySQL database. It’s another set of coding examples for the AlmaLinux instance that I’m building for students. This one demonstrates basic Perl programs, connecting to MySQL, returning data sets by reference and position, dynamic queries, and input parameters to dynamic queries.
- Naturally, a hello.pl is a great place to start:
#!/usr/bin/perl # Hello World program. print "Hello World!\n";
After setting the permissions to -rwxr-xr-x. with this command:
chmod 755 hello.pl
You call it like this from the Command-Line Interface (CLI):
./hello.pl
It prints:
Hello World!
- Next, a connect.pl program lets us test the Perl::DBI
connection to the MySQL database.
#!/usr/bin/perl # Import libraries. use strict; use warnings; use v5.10; # for …
The OpenLampTech developer newsletter is one year old! I honestly don’t know where the past year went. Obviously, I had my nose buried in some fantastic content since OpenLampTech publishes mostly curated newsletters.
I tell you though, don’t think it isn’t a challenge adding your own thoughts and commentary to someone else’s great content because it definitely is.
I plan to continue publishing curated content in OpenLampTech but, also cover tech reporting and news-related topics that are within the MySQL, PHP, and LAMP stack ecosystems.
There seems to always be plenty to talk about in these areas so a shortage of topics won’t be the issue (I don’t think).
The Newsletter for PHP and MySQL Developers
Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when …
[Read more]This is a demo tutorial to show how we can create InnoDB Cluster with newly installed Certificate and having X509 certificate verification via MySQL Router connection.
Recorded Video
The full process is recorded on Youtube - showing creating InnoDB Cluster with newly installed CA, Server Certificates. The Router creation is configured with SSL Server certificate from the same CA certificate across Server nodes. The creation of User (create user my509user identified by '....' require X509) using X509 certificate PASSTHROUGH verification via Router connection.
https://www.youtube.com/watch?v=w1xgpjw0VTw
Environment
The following environment was tested
Oracle Linux Server release 8.6
MySQL Server 8.0.31
MySQL Shell 8.0.31 …
[Read more]Sometimes, the MySQL Optimizer chooses a wrong plan, and a query that should execute in less than 0.1 second ends-up running for 12 minutes ! This is not a new problem: bugs about this can be traced back to 2014, and a blog post on the subject dates of 2015. But even if this is old news, because this problem recently came to my attention, it is a problem worth writing on.
This
In this blog post, we will show you ten useful mysqladmin commands for database administration. Mysqladmin is a client for ...
The post 10 Useful mysqladmin Commands for Database Administration appeared first on RoseHosting.
At Percona Managed Services, sometimes clients’ applications face deadlock situations and need all historic deadlock information for application tuning.
We could get the LATEST DETECTED DEADLOCK from SHOW ENGINE INNODB STATUS\G:
…. ------------------------ LATEST DETECTED DEADLOCK ------------------------ *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 163 page no 3 n bits 72 index GEN_CLUST_INDEX of table `deadlock_test`.`t` trx id 78507 lock_mode X waiting *** (2) TRANSACTION: TRANSACTION 78508, ACTIVE 155 sec starting index read mysql tables in use 1, locked 1 ….
But how could we view all past deadlock information?
We could enable innodb_print_all_deadlocks, and all deadlocks in InnoDB user transactions will be recorded in the MySQL error log.
Let‘s start the test.
Create the test database …
[Read more]