Showing entries 61 to 70 of 5669
« 10 Newer Entries | 10 Older Entries »
Searching For: gp update (reset)
Learning SQL Exercise

I’ve been using Alan Beaulieu’s Learning SQL to teach my SQL Development class with MySQL 8. It’s a great book overall but Chapter 12 lacks a complete exercise. Here’s all that the author provides to the reader. This is inadequate for most readers to work with to solve the concept of a transaction.

Exercise 12-1

Generate a unit of work to transfer $50 from account 123 to account 789. You will need to insert two rows into the transaction table and update two rows in the account table. Use the following table definitions/data:

                      Account:
account_id     avail_balance    last_activity_date
-----------    --------------   ------------------
       123               450    2019-07-10 20:53:27
       789               125    2019-06-22 15:18:35

                      Transaction:
txn_id    txn_date      account_id    txn_type_cd    amount
------    ----------    -------+--    -----------    ------
  1001 …
[Read more]
Identifying and profiling problematic MySQL queries

Though we try our best to avoid it, it's easy to let underperforming queries slip through the cracks in our workloads, negatively impacting the performance of a database system. This is especially true in large-scale database environments, with many gigabytes or terabytes of data, hundreds of tables, and thousands of query patterns being executed on a daily basis.

Thankfully, MySQL has the ability to collect data that can be leveraged for identifying problematic queries, and can also do profiling on them in order to drill into their poor performance. In this article, I'll go over several built-in techniques for how to do this in native MySQL. If you use PlanetScale, this type of information can be gathered more easily and intuitively using the PlanetScale Insights dashboard. I'll include a brief discussion of this feature later on.

For this …

[Read more]
Galera Cluster for MySQL 8.0.36 released

Codership is pleased to announce a new Generally Available (GA) release of the multi-master Galera Cluster for MySQL 8.0, consisting of MySQL-wsrep 8.0.36 (release notes, download), with Galera replication library 4.18 (release notes, download) implementing wsrep API version 26. This release incorporates all changes to MySQL 8.0.36, adding a synchronous option for your MySQL High Availability solutions.

There have been some notable changes …

[Read more]
Installing Galera Cluster 4 with MySQL on Ubuntu 22.04

We have in the past covered Installing Galera Cluster 4 with MySQL 8 on Ubuntu 18.04 and also Installing Galera 4 with MySQL 8 on Ubuntu 20.04, and it would seem appropriate to also cover Ubuntu 22.04 LTS (Jammy Jellyfish). We do have excellent documentation and we also have the ability for you to automate all of this via the GUI tool, Galera Manager.

Prerequisites

  • All 3 nodes have to have Ubuntu 22.04 LTS installed. The current version at the time of this writing is Ubuntu 22.04.3 LTS.
  • Firewall (if setup) needs to …
[Read more]
Three common MySQL database design mistakes

Many years ago, I worked for a telematics company that ingested data from hundreds of thousands of devices worldwide. There was a point of incredible growth where we onboarded a customer that gave us a massive number of new devices and a huge bump in revenue. It was a great moment for the company's trajectory, but the increased amount of data being processed highlighted a massive flaw in our system.

The ID column of the data history table (which logged every event that occurred across all devices) was created with the INT data type, and it was quickly running out of space.

It wasn't an issue immediately, but if that column ran out of space, our entire system would come to a halt. Funnily enough, we built a quick tool called “the doomsday clock,” which would roughly calculate the date this would occur. Had we expected this, we would have designed the database with a different type that would have more easily …

[Read more]
Newsletter Repost – OpenLampTech issue #116

SheetDB API for Google Sheets | SQL execution order | WordPress ACF big update | Do you need foreign keys | WordPress plugin git repo set up.

Code, content, and community for developers.

The LAMP stack and the PHP technologies and frameworks it runs.

Be sure you’re subscribed to OpenLampTech so you don’t miss out on any of the content each week.

Thank you for reading this post. Please share it with someone else who would enjoy it as well.

Disclaimer: The majority of examples in this post, are performed in a personal development/learning workstation environment and should not be considered production quality or ready. Your particular goals and needs may vary. Like always, just because …

[Read more]
Ruby+MySQL on Ubuntu

This post goes through installing and configuring Ruby and Ruby on Rails for MySQL. The first step requires updating the Ubuntu OS:

sudo apt-get update

Interestingly, I found that the man-db service had inadvertently stopped. It raised the following error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

You run this command to find the problem with the dpkg utility:

sudo dpkg --configure -a

It returned:

Setting up man-db (2.10.2-1) ...
Updating database of manual pages ...
man-db.service is a disabled or a static unit not running, not starting it.

The following command started the man-db service:

sudo systemctl start man-db.service

Next, you install the prerequisite packages with this command:

sudo apt-get install -y git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev …
[Read more]
SMUG MySQL Meetup on February 8th – Registration is open

Following on from the previous “Where can you find MySQL during December – February 2024” blog updated last week as “Update No. 2”, we are happy to announce that we have the SMUG Meetup registration page up and running! You can register now at the link below. For those of you who are not familiar […]

Galera Cluster for MySQL 5.7.44 and MySQL 8.0.35 released

Codership is pleased to announce a new Generally Available (GA) release of the multi-master Galera Cluster for MySQL 5.7, consisting of MySQL-wsrep 5.7.44 (release notes, download) and MySQL-wsrep 8.0.35 (release notes, download), with Galera replication library 4.17 (release notes, download) implementing wsrep API version …

[Read more]
MySQL isolation levels and how they work

In the early 1980’s, computer scientists Andreas Reuter and Theo Harder coined the term ACID to describe a set of properties related to database transactions designed to keep data stored reliably and with integrity.

Most (if not all) modern database systems are built around ACID compliance. By adhering to these fundamentals, businesses can confidently trust the data within their database, whether it’s for a small project management app, or a large banking system. Isolation levels, as well as the related concepts, are cornerstones that enable MySQL to fulfill ACID guarantees.

In this article, we’ll break down how multiple clients can work with a single database and maintaining data consistency by using isolation levels.

[Read more]
Showing entries 61 to 70 of 5669
« 10 Newer Entries | 10 Older Entries »