Contents
[Read more]
There was an option during the Fedora 30 Workstation installation
to add the Apache Web Server, but you need to set it to start
automatically. Unfortunately, there was no option to install PHP,
which I thought odd because of how many web developers learn the
trade first on PHP with a LAMP (Linux, Apache, MySQL,
Perl/PHP/Python) stack. You see how to fix that shortcoming in
this post and how to install and test PHP, mysqli,
and pdo to support MySQL 8.
Before you do that make sure you install MySQL 8. You can find my prior blog post on that here.
You set Apache to start automatically, on the next boot of the operating system, with the following command:
chkconfig httpd on
It creates a symbolic link:
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → …[Read more]
While updating my class image to Fedora 30, I noticed that it installed the Akonadi Server. The documentation on the Akonadi server lacked some straightforward documentation. It also offered a bundled set of software that limited how to approach MySQL development.
So, I removed all those packages with the following syntax:
dnf remove `rpm -qa | grep akonadi`
Display detailed console log →
Dependencies resolved. ============================================================================= Package Arch Version Repo Size ============================================================================= Removing: akonadi-import-wizard x86_64 19.04.2-1.fc30 @updates 2.8 M kf5-akonadi-calendar x86_64 19.04.2-1.fc30 @updates 2.6 M kf5-akonadi-contacts x86_64 19.04.2-1.fc30 @updates 3.3 M kf5-akonadi-mime …[Read more]
Answering this question is not easy. Like always, the best response is “it depends” !
But let’s try to give you all the necessary info the provide the most accurate answer. Also, may be fixing one single query is not enough and looking for that specific statement will lead in finding multiple problematic statements.
The most consuming one
The first candidate to be fixed is the query that consumes most
of the execution time (latency). To identify it, we will use the
sys schema and join it with
events_statements_summary_by_digest from
performance_schemato retrieve a real example of the
query (see this post for more details).
Let’s take a look at what sys schema has to offer us
related to our mission:
> show tables like …[Read more]
Percona announces the release of Percona Server for MySQL 8.0.16-7 on August 15, 2019 (downloads are available here and from the Percona Software Repositories).
This release is based on MySQL 8.0.16. It includes all bug fixes in these releases. Percona Server for MySQL 8.0.16-7 is now the current GA release in the 8.0 series. All of Percona’s software is open-source and free.
Percona Server for MySQL 8.0.16 includes all the features available in MySQL 8.0.16 Community Edition in addition to enterprise-grade features developed by Percona. For a …
[Read more]Deployment and management your database environment can be a tedious task. It's very common nowadays to use tools for automating your deployment to make these tasks easier. Automation solutions such as Chef, Puppet, Ansible, or SaltStack are just some of the ways to achieve these goals.
This blog will show you how to use Puppet to deploy a Galera Cluster (specifically Percona XtraDB Cluster or PXC) utilizing ClusterControl Puppet Modules. This module makes the deployment, setup, and configuration easier than coding yourself from scratch. You may also want to check out one of our previous blogs about deploying a Galera Cluster using Chef, “How to Automate Deployment of MySQL Galera Cluster Using S9S CLI and Chef.”
Our …
[Read more]Recently, PeterZ pointed a huge difference in memory usage of MySQL 8.0 compare to MySQL 5.7. This can be an issue for small instances if the same configuration for buffers like the buffer pool are not changed.
As explained in Peter’s article, this can lead to the awakening of the so feared OOM Killer !
MorganT, pointed accurately in his comment what is the source of such difference and how this was then caused by the new instrumentation added in MySQL 8.0.
Nothing is free, even as a …
[Read more]Author: Robert Agar
Tuning database performance is a complicated task that can be a thorn in the side of the database team. There are many interconnected components and environmental aspects that come under consideration when attempting to optimize the performance of your database systems. A DBA can be hard-pressed to determine where to begin their optimization efforts.
An initial investigation may concentrate on the network and hardware on which the database is running. These inquiries may uncover issues that can be easily identified and addressed. It may be a simple matter of adding some disk space or upgrading memory on the database’s server. You might be able to move the database to a less-used network segment to improve the response time when satisfying user requests. Maybe there are conflicting applications or processes on the same server that are impacting the availability of resources to power the …
[Read more]Disable SELinux? Think again!
SELinux is always a complicated topic. If you search this on the web, most people will advise just disabling it, but that may not be acceptable from a security point of view in your organization. In this case, we are going to see how to solve an issue with SELinux and MySQL log rotation
We had configured log rotation as per this post. The scripts seemed to work perfectly when running manually. However, when running under cron they would fail to run. Since there were no other errors in the logs, eventually I tracked that down to SELinux. What I found is that SELinux default policies prevent logrotate daemon from making the changes to files outside of /var/log. In this case, MySQL logs were living on /var/lib/mysql so that was clearly the problem.
Figuring out SELinux
The first thing to do when debugging a …
[Read more]
Multi-Valued Indexes are going to change the way you think about
using JSON data and the way you architect your data. Before MySQL
8.0.17 you could store data in JSON arrays but trying to search
on that data in those embedded arrays was tricky and usually
required a full table scan. But now it is easy and very
quick to search and to access the data in JSON arrays.
Multi-Valued IndexesA Multi-Valued Index (MVI) is a secondary
index defined on a column made up of an array of values. We
are all used to traditional indexes where you have one value per
index entry, a 1:1 ratio. A MVI can have multiple records
for each index record. So you can have multiple postal
codes, phone numbers, or other attributes from one JSON document
indexed for quick access. See Multi-Valued Indexes for details.
…