Showing entries 1671 to 1680 of 44869
« 10 Newer Entries | 10 Older Entries »
The customer is always wrong

“The customer is always right” – that’s a saying that serious businesses actually say sometimes, with a serious and straight face. It’s one of those sayings rooted in good intentions and immediately polluted with the messy reality of the real world.

When you’re working in Database or even Network Engineering, the real answer is far more complicated and nuanced, but it’s much closer to “the customer is always wrong”. That is not to say that the Database or Network Engineer is right, either, though.

Usually the customer (in this case usually a Software Engineer) comes to us, or more likely pages us, with something like “the database is down”. Why? Because they got an error message like “The server has gone away” or “Too many connections” or “Host unreachable” or any number of error messages which are simultaneously too descriptive, and completely unhelpful. Such error messages are good at leading people …

[Read more]
Pagination in MySQL

Any good DBA will tell you to "select only what you need." It's one of the most common aphorisms, and for good reason! We don't ever want to select data that we're just going to throw away. One way this advice manifests itself is to not use SELECT * if you don't need all the columns. By limiting the columns returned, you're selecting only what you need. Pagination is another way to "select only what you need." Although, this time, we're limiting the rows instead of the columns. Instead of pulling all the records out of the database, we only pull a single page that we're going to show to the user. There are two primary ways to paginate in MySQL: offset/limit and cursors. Which method you choose depends on your use case and your application's requirements. Neither is inherently better than the other. They each have their own strengths and weaknesses. The importance of deterministic ordering Before we talk about the wonders of pagination, we need to …

[Read more]
Pagination in MySQL

An overview of the different ways to paginate in MySQL including limit/offset pagination and cursor pagination plus the pros and cons of each.

Announcing MySQL InnoDB ReplicaSet/Cluster/ClusterSet & MySQL Shell 8.0.33

MySQL Shell 8.0.33 was released last week. Apart from several bugfixes, there are some new, important, and long-desired features related to security, concurrency control, and performance settings. Passwordless authentication (certificate-based authentication) The AdminAPI enables an easy set-up and maintenance of MySQL deployments, either for High Availability or Disaster Recovery. Security is crucial and InnoDB Cluster has support for […]

Adding a node to your existing Galera Cluster

A common question we get is: can I add a node to my Galera Cluster without restarting the entire cluster? The simple answer is YES.

A lot worry about the fact that you do list servers that are part of the cluster within your my.cnf, and this file is not reloadable in a dynamic fashion. Fret not, though, because as long as your my.cnf has one active cluster member (the DONOR), you can have it be the JOINER.

If for example, you have 3 nodes: galera1: 159.223.105.21 galera2: 137.184.78.182 galera3: 137.184.65.171

The my.cnf line for wsrep_address should read as follows:

wsrep_cluster_address="gcomm://159.223.105.21,137.184.78.182,137.184.65.171"

It is then trivial for you to have your fourth server (say, galera4: 161.35.120.111), have a my.cnf that reads as follows:

wsrep_cluster_address="gcomm://159.223.105.21,137.184.78.182,137.184.65.171,161.35.120.111"

Now, …

[Read more]
Don’t Auto pt-online-schema-change for Tables With Foreign Keys

During the early stages of my career, I was captivated by the theories and concepts surrounding foreign keys and how they empowered us to maintain data integrity. However, in practical application, I have found them to be quite challenging to manage. I am sure you’re a champion DBA, but I keep my distance from foreign keys.

With that short story as a background, this post aims to address the dilemma that arises when utilizing the pt-online-schema-change tool on tables that contain foreign keys.

We already know what one of the most used Percona tools pt-online-schema-change is and how pt-online-schema-change handles foreign keys.

When utilizing the pt-online-schema-change tool to alter a table, such as …

[Read more]
Using Aggregate Functions With MySQL Document Store

When using the MySQL Document Store API, we can use MySQL functions in the fields() method. In this post, we will talk about how you can use MySQL functions to return aggregate data from properties with simple values and how to use user-defined functions to return aggregate values from properties that are arrays.

Using Aggregate Functions With MySQL Document Store

MySQL Document Store is a JSON document storage solution built on MySQL. One of the advantages of using MySQL Document Store for JSON document storage is when we need to run complex queries for analytics or reporting we can use raw SQL to retrieve data from our JSON documents. But what if we want to view […]

How to Install LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Rocky Linux 9

OpenLiteSpeed is a lightweight and open-source version of the LiteSpeed Server developed by LiteSpeed Technologies. It supports Apache Rewrite rules, HTTP/2 and HTTP/3, TLS v1.3, and QUIC protocol.

MySQL at FOSSASIA 2023

We are happy to announce our attendance at FOSSASIA 2023, FOSSASIA is hold in Singapore from Thu, Apr 13, 8:30am (SGT) until Saturday, Apr 15, 6:30pm (SGT). You can find our team at the MySQL booth in the expo area and also attend any of the MySQL talks, including a MySQL Keynote as follows: Please […]

Showing entries 1671 to 1680 of 44869
« 10 Newer Entries | 10 Older Entries »